You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND `w`.`user_id` NOT IN (1,2,8,24,1990,8301,30654) GROUP BY `w`.`user_id` ORD' at line 1