TP5统计不一个字段不为空的条数代码出错。求指导

浏览:3847 发布日期:2018/01/26 分类:ThinkPHP5专区
需要统计一个字段的值不为空的条数,代码如下:$data['count3']=Db::name('renyuan')->where(['cswsurl'!=NULL])->count();用上面的代码提示错误SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 1 LIMIT 1' at line 1求指导怎么写这个统计语句,谢谢了。
最佳答案
评论( 相关
后面还有条评论,点击查看>>