Yii 查询 find 条件不等于null or 不能等空


Yii 查询 find  条件不等于null or 不能等空
$postware = Postware::find()->select(['house_num'])->where(['account_id' => $account_id, 'send_way' => 4])->andFilterWhere(['OR',['not', 'house_num=""'], ['NOT', ['house_num' => null]]])->orderBy(['id' => SORT_DESC])->limit(1)->asArray()->one();

$returnOrder =  ReturnOrder::find()->select(['id', 'waybill'])->where(['state'=>10])->andWhere(['OR',['IS','weight',new \yii\db\Expression('NULL')],['weight'=>0]])->asArray()->all();


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM