I want to use a yii2
query in which i want to check a not equal to condition.
I tried like this but it didn't give the desired results. how do i do it?
$details = MovieShows::find()->where(['movie_id'=>$id])
->andWhere(['location_id'=>$loc_id])
->andWhere(['cancel_date'=>!$date])->all();
You can use this
The better and safe way to apply a condition.
In case anyone reading this needs to use a REGEXP or similar, this works in Yii2 (2.0.15.1):
->andWhere(['NOT REGEXP', 'column','[A-Za-z]'])