catfan / Medoo

The lightweight PHP database framework to accelerate the development.
https://medoo.in
MIT License
4.84k stars 1.15k forks source link

如果在where语句中,写如1=1这样的语句时会报错 #502

Closed TaSnow closed 7 years ago

TaSnow commented 7 years ago

如果在where语句中,写如1=1这样的语句时会报错,使用自带的error()方法打出的报错信息如下: Array ( [0] => 42S22 [1] => 1054 [2] => Unknown column '1' in 'where clause' ) 请问要如何解决?

ajm113 commented 7 years ago

'#1' => '1'

使用SQL函数 or "Using SQL Functions" (in English) http://medoo.in/api/where