Invalid query: SELECT p.id, DATE_FORMAT(p.issue, '%d %M, %Y') FROM pages p, page_cats pc, category c WHERE p.id=pc.page AND pc.main=c.main AND pc.sub=c.sub AND c.sub = 1 AND p.status = 1 AND p.product=139 AND p.template = 2930 {AND p.id NOT IN (3626168#3626189#3626179#3626335#3626238#3626257) ORDER BY p.issue desc limit 6
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.id NOT IN (3626168#3626189#3626179#3626335#3626238#3626257) ORDER BY p.' at line 13