Кто знает как правильно добавить условие NOT IN?
Дело в том, что с просто IN все оказалось легко:
Код: Выделить всё
User::find()->where(['id' => $_membersIds])->all()
Код: Выделить всё
User::findAll(['not in ','id', $_membersIds]);
Код: Выделить всё
SELECT * FROM `user` WHERE `id` IN ('not in ', 'id', NULL)
А если написать вот так, например:
Код: Выделить всё
User::find()->where(['not in ','id', array(8,9)])->all()
Код: Выделить всё
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '8' at line 1
The SQL being executed was: SELECT * FROM `user` WHERE `id` NOT IN 8