yii 常用orm

时间:2024-04-14 22:35:33

yii2 orwhere andwhere的复杂写法:https://www.codercto.com/a/6513.html

$files = XXXX::find()
->andWhere(['<>', 'queue_name', ''])
->andWhere(['or',
['queue_status' => ''],
[
'and',
['queue_status' =>'error'],
['retry' => 0]
]
])
->all();