SELECT SQL_CALC_FOUND_ROWS  p.id, pt.name, p.slug, pp.price, pp.promo, pp.price_promo, pp.availability, pp.id as param_id,  pp.name as param_name,

			IF(pp.promo = 'yes', pp.price_promo, pp.price) as actual_price,

			p.ref_num, p.created_at, pt.meta_description, p.new, p.publisher_id,

			pub.name as publisher, p.top, p.action, p.soon, p.gift,

			p.most_sold, m.name as measure



	     FROM products p

	     INNER JOIN products_text pt ON p.id = pt.product_id AND pt.language_id = 1

	       INNER JOIN product_categories pc ON p.id = pc.product_id 

	     INNER JOIN products_params pp ON p.id = pp.product_id
         
         

	     LEFT JOIN pages_text pub ON p.publisher_id = pub.page_id AND pub.language_id = 1

	     LEFT JOIN pages_text m ON p.measure_id = m.page_id AND m.language_id = 1
         

	     WHERE p.status != 'deleted'

	   

	     

	     

	     

	     

	     

	     

	     

	     

	     

	      AND pc.relation_id = 

	     

	    

	     GROUP BY p.id

	     ORDER BY p.id DESC

	     LIMIT 15 OFFSET 0

	    

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 p.id

	     ORDER BY p.id DESC

	     LIMIT 15 OFFSET 0' at line 56

file -
line -