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