thinkphp如何查出值是null的布尔类型的值
exp 是用原生表达式查询的意思
$res=Db::table('tbcardlist')->where('qc_hr_wac_hadsend','exp','is null or qc_hr_wac_hadsend=0')->order('ID','asc')->find();
查询值是null的字段的值时,要写 name is null 写 name = null 是查不出正确的数据的
要写 name is null
select top 10 * from tbcardlist where qc_hr_wac_hadsend is null or qc_hr_wac_hadsend=0 order by ID asc
select top 10 * from tbcardlist where qc_hr_wac_hadsend is null order by ID asc
select top 10 * from tbcardlist where qc_hr_wac_hadsend is not null order by ID asc
原文地址:https://blog.csdn.net/qq_21810059/article/details/143644925
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!