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 pg_article.aid = pg_article_file.aid and pg_article.cid = pg_article_class.c' at line 1