比如最终形成的sql语句可能类似下面:
select id from tablename where photo<>'' and photo is not null
但是代码中因为查询条件为通过数组拼凑,所以需要写成下面的形式取得上面SQL
$where['photo'] = [['not null', ''], ['<>', ''], 'and'];
如果为查询null则应该like: $where['photo'] = ['null', ''];
s1ihome 2020-01-14 16:43 原文
select id from tablename where photo<>'' and photo is not null
但是代码中因为查询条件为通过数组拼凑,所以需要写成下面的形式取得上面SQL