SELECT SQL_CALC_FOUND_ROWS p.id, pt.name, p.slug, p.price, i.image, p.ref_num, p.promo, p.price_promo, p.created_at, pt.meta_description, p.new, c.name as category, sc.name as subcategory,
			pub.name as publisher,
			pt.price as actual_price 
	     FROM products p
	     INNER JOIN products_text pt ON p.id = pt.product_id AND pt.language_id = 1
	     LEFT JOIN products_images i ON p.id = i.page_id
	     LEFT JOIN pages_text pub ON p.publisher_id = pub.page_id AND pub.language_id = 1
	     LEFT JOIN pages_text c ON p.category = c.page_id AND c.language_id = 1
	     
	      LEFT JOIN pages_text sc ON p.subcategory = sc.page_id AND sc.language_id = 1
	 
	     WHERE p.status != 'deleted'
	     AND CHAR_LENGTH( p.slug ) > 1
	     AND p.id != 
	  
	     GROUP BY p.id
	    ORDER BY p.last_sawn DESC
	    LIMIT 6
	 
	    

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.last_sawn DESC
	    LIMIT 6' at line 16

file -
line -