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 (method_id=1 or method_id=0) and (user_group_id=1 or user_group_id=0)' at line 1