3065 - Expression #1 of ORDER BY clause is not in SELECT list, references column 'cardineq_cprintdb02.xp.sort_order' which is not in SELECT list; this is incompatible with DISTINCT
select distinct p.products_id, p.products_image, pd.products_name, p.products_tax_class_id, products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, specials_new_products_price
from products_xsell xp left join products p on xp.xsell_id = p.products_id
left join products_description pd on p.products_id = pd.products_id and pd.language_id = '1'
left join specials s on p.products_id = s.products_id
where xp.products_id = '771'
and p.products_status = '1'
order by sort_order asc limit 4
[TEP STOP]
|