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();
posted @ 2020-11-25 15:25  没事就更  阅读(1264)  评论(0编辑  收藏  举报