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

    1 answer 1

    See the sql operators - there are not too many of them, so as not to remember the existence of the "not equal" operator:

     auth_assignment.auth_name != "admin" 
    • one
      or such an operator is not equal to <> - Naumov