3.23版本为什么where,使用字符串查询报错,使用数组就正确呢

浏览:495 发布日期:2015/06/11 分类:求助交流 关键字: where 字符串报错 数组
比如下面的,这样就会报错,
$Model = M('User');
$Model -> where( ' id = ' .$id )->select();

而这样就没问题

$Model -> where( array('id'=>$id) )->select();

这是为什么啊?
在3.1.3版本上也是没问题的,移植到3.2.3就会这样?
最佳答案
评论( 相关
后面还有条评论,点击查看>>