rayna qarla
rayna qarla

Reputation: 93

what to do when got error operator " required two operands?

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

Answers (1)

Muhammad Omer Aslam
Muhammad Omer Aslam

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

Related Questions