TP5.0 数据库查询is not null

比如最终形成的sql语句可能类似下面:
select id from tablename where photo<>'' and photo is not null

但是代码中因为查询条件为通过数组拼凑,所以需要写成下面的形式取得上面SQL

$where['photo'] = [['not null', ''], ['<>', ''], 'and'];
 
如果为查询null则应该like: $where['photo'] = ['null', ''];
原文地址:https://www.cnblogs.com/s1ihome/p/12192807.html