Where 数组报错

浏览:456 发布日期:2017/02/09 分类:求助交流
$where["_unionid"]='75454qweasd174';
M('agent')->where($where)->field('ID')->find();
最后报错 说Where为空
SELECT `ID` FROM `agent` WHERE ( ) LIMIT 1
我试了很多
$where["'_unionid'"]="'75454qweasd174'"; 加上引号以后
SELECT `ID` FROM `agent` LIMIT 1 直接返回没有Where的
有没有查询!这到底是怎么回事啊??
M('agent')->where("_unionid='4561564'")->field('ID')->find()
字符串可以直接通过,数组就会报错
最佳答案
评论( 相关
后面还有条评论,点击查看>>