SELECT users.id, ip, balance FROM `users`;
and users.id=pays.mid and users.id not in(select distinct pays.mid from pays where category in (490,496))