























比如最终形成的sql语句可能类似下面:
select id from tablename where photo<>'' and photo is not null
但是代码中因为查询条件为通过数组拼凑,所以需要写成下面的形式取得上面SQL
$where['photo'] = [['not null', ''], ['<>', ''], 'and'];
如果为查询null则应该like: $where['photo'] = ['null', ''];
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。