select p.*, as pgroup_id, pg.ident as pgroup_ident, as ppgroup_id from szd_product p, szd_pgroup pg, szd_pgroup ppg, szd_m2m_news_product m2m where and and and and m2m.published=1 and m2m.deleted=0 and p.published=1 and p.deleted=0 and pg.published=1 and pg.deleted=0 and ppg.published=1 and ppg.deleted=0 order by ppg.manorder asc, pg.manorder asc, p.manorder asc
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 and and m2m.published=1 and m2m.deleted=0' at line 1