Yii2 : Active Record add Not In condition
Asked 07 September, 2021
Viewed 1.2K times
  • 54
Votes

What is the active Record way of adding IN condition to an active Query in yii 1.x you could use CDbCriteria like this

$cr = new CDbCriteria();
$cr->addNotInCondition('attribute', $array);

There seem to be no equivalent API call in yii2 active record implementation, how to do this via active record ?

4 Answer