Unable to commit query SELECT pg.group_description, pg.group_name, pg.start_date, pg.end_date, pg.group_id, pg.meeting_id, p.product_id, p.class, p.static_data FROM product_group AS pg, products AS p, catalog AS c WHERE c.productGroup_id=pg.group_id AND ((c.use_start_date=0 AND c.published=1) OR (c.use_start_date=1 AND pg.start_date<='2017-07-25')) AND p.group_id=pg.group_id AND c.productGroup_id=pg.group_id AND p.class='fixeditem' ORDER BY pg.group_id,p.order_by, p.product_id