A Database Error Occurred

Error Number: 1064

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 ') order by a.data_creazione desc limit 0,20' at line 1

select distinct a.articolo_id from articoli a, articolo_visibilita_blog ab where ab.articolo_id=a.articolo_id and a.articolo_visibile=1 and ab.articolo_dominio_id=8 and articolo_categoria_id in(170,551) and a.articolo_id not in() order by a.data_creazione desc limit 0,20