yii2 arwhere查询 orwhere 和orfilterwhere 啥区别呢
回复内容: yii2 arwhere查询 orwhere 和orfilterwhere 啥区别呢
带filter的操作内部会过滤掉为空的条件
null
''
空数组
比如查询条件:
orfilterwhere([ 'status' => 0, 'name' => '', 'age' => null, 'sex' => [] ])
最后去掉为空的组成查询条件,依据规则就剩下status = 0这个条件了
