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 start_here_status=0' at line 1select user_id from members where user_id= AND start_here_status=0