SELECT SQL_CALC_FOUND_ROWS  p.id,p.recommended, 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 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 =1513 

	     

	    

	     GROUP BY p.id

	     ORDER BY p.top ASC 

	     LIMIT 15 OFFSET 0

	    

Unknown column 'pc.relation_id' in 'where clause'

file -
line -