There are two tables 1 - users, fields id, name 2 - auth_assignment, fields id, user_id, auth_name
The id string is user_id. I can do this request
SELECT * FROM users INNER JOIN auth_assignment ON (users.id = auth_assignment.user_id) WHERE auth_assignment.auth_name = "admin" And I need a complete negation, that is, to pull out everything except those lines where there is a match over the field auth_name = "admin"
And preferably on the syntax of Yii2 active record, but you can also clean mysql code