Gallery
select g.foto, p.titolo_it as titolo_prod, c.titolo_it as titolo_categoria from gallery_prodotti as g left join prodotti as p on (g.idPress=p.id) left join categorie as c on (c.id=p.categoria) where p.categoria in(select id from categorie where pagina_gallery=) and p.aut=2 and c.aut=2 order by titolo_categoria , g.pos
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 p.aut=2 and c.aut=2 order by titolo_categoria , g.pos' at line 1