I am new to Yii-2 framework. How can i achieve following query in Yii-2 framework using activeQuery and models.
SELECT * FROM users AS u WHERE u.user_id IN(1
With MongoDB:
MongoDB
$query->andWhere(['and', ['$eq', 'status', 1], ['$in', 'activity', [1, 2]], ]); $query->orWhere(['$in', 'yourField', $yourArray]);
Tested. Similar with DBMS.