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(); 

  

相关文章:

  • 2022-12-23
  • 2021-11-13
  • 2021-10-01
  • 2021-12-29
  • 2021-08-17
  • 2021-06-23
  • 2021-11-29
猜你喜欢
  • 2021-06-13
  • 2022-12-23
  • 2022-12-23
  • 2022-01-31
  • 2022-01-25
  • 2022-03-08
相关资源
相似解决方案