ERROR!!1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND user_type='jobseeker') AND news_status='Active' AND news_for IN('both','jobs' at line 1 QUERY select * from vreport_news where news_id NOT IN(select news_id from vreport_client_news_readed where client_id= AND user_type='jobseeker') AND news_status='Active' AND news_for IN('both','jobseeker')