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 'limit 0, 12' at line 13
select distinct p.products_image, pd.products_name,
p.products_id,
p.products_image , p.products_price,
p.products_quantity,
p.products_tax_class_id,
if(s.status, if(isnull(pg.customers_group_price), least(s.specials_new_products_price, p.products_price), least(pg.customers_group_price, s.specials_new_products_price)), if(isnull(pg.customers_group_price), p.products_price, least(pg.customers_group_price, p.products_price))) as final_price from (products p
left join specials s using(products_id) )
left join products_groups pg on p.products_id = pg.products_id and pg.customers_group_id = 'g',
products_description pd where p.products_status = '1'
and pd.products_id = p.products_id
and pd.language_id = '1'
and p.products_group_access like '%g%'
order by p.products_date_added desc, limit 0, 12