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?
yii2
= $form->field($model, 'first_name')->dropDownList( arrayhelper::map(user::find() ->where([ 'not in ' ,'first_name', patient::find() ->select([ 'patient_name' ]) ->asArray() ]) ->all(),'id','first_name')
Maybe it help you for whom need to use subquery .