update更新语句生成错误

浏览:1145 发布日期:2016/04/07 分类:求助交流
M('User')->where(array('id'=>$id))->save(array('username'=>'hello'));

有时候可以正常更新,有时候生成的语句有问题,
生成的语句是这样的:
update 'think_user' set 'username'='hello' where id=1'
也就是where后面带多一个符号,造成没法执行,有时候也可以正常执行,不知是什么问题。
最佳答案
评论( 相关
后面还有条评论,点击查看>>