Reputation: 93
my question is about i got the error said operator " required two operands what should i do ?
$user_id=Yii::$app->user->identity->username;
$query = Appendix::find()
->andFilterWhere(['customer_id'=>$user_id])
->andFilterWhere(['status'== null]);
Thank you in advanced.
Upvotes: 1
Views: 10539
Reputation: 23738
If i am not wrong, What you are looking for can be done like the following way to check the column value for null
.
->andWhere(['is', 'status', new \yii\db\Expression('null')]),
Upvotes: 2