if ( var = 5){
// операции
}
select * from users where id not in (select user_id from user_roles join roles on role_id = roles.id where roles.title='админ')
select * from users where not exists (select user_id from user_roles join roles on role_id = roles.id where roles.title='админ' and user_id = users.id)
select * from users left join (user_roles, roles) ON (role_id = roles.id and user_id = users.id and roles.title='админ') where user_id is null