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 email not in (select distinct destinatarios from hv_enviador_mensaje wher' at line 1

select * from hv_portal_mailinglist where email_stop=0 and email_error_hard=0 and email_error_soft=0 and mailingid in () and email not in (select distinct destinatarios from hv_enviador_mensaje where newsid=) and id not in (select distinct mailid from hv_enviador_mensaje where newsid=) order by id desc