Column not found: 1054 Unknown column ‘张123’ in ‘where clause’
出现这个问题是因为系统把你以为的字符串当做了mysql的关键字。
比如,你的sql是这样写的:
#条件加引号
model()->where("name='$conditions' and is_del<>2")->find();//正确
Column not found: 1054 Unknown column ‘张123’ in ‘where clause’
出现这个问题是因为系统把你以为的字符串当做了mysql的关键字。
比如,你的sql是这样写的:
#条件加引号
model()->where("name='$conditions' and is_del<>2")->find();//正确