drop table if exists banlist;
create table banlist (user_id int, ban_id int);
insert into banlist values (1, 2), (1, 3), (2, 0), (3, 0);
select user_id from banlist where ban_id != 2 and user_id != 2;
+---------+
| user_id |
+---------+
| 1 |
| 3 |
+---------+ |