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 '(total_current < total_max) and status=1 and redirect!=1 and redirect!=4 and red' at line 1