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 'group by c.categories_id' at line 1

select if(c.last_modified>max(products_last_modified),c.last_modified,max(products_last_modified)) as plm from categories c, products p, products_to_categories p2c where c.categories_id = p2c.categories_id and p.products_id = p2c.products_id and c.categories_id = group by c.categories_id

[TEP STOP]