TP6 model mysql 语句 where is null 查询写法
use think\facade\Db;use think\db\Raw;$mode = (new User())->where([ ['name','EXP',new Raw('IS NOT NULL')], // 写法一 ['mobile','EXP',`DB::raw('IS NULL')`] // 写法二])->field("*")->select()->toArray()有问题请添加个人微信:【mengyilingjian】,进群一起技术讨论。添加时请备注
原创
2022-02-21 23:17:28 ·
1318 阅读 ·
0 评论