1250 - Table 'p' from one of the SELECTs cannot be used in global ORDER clause

( select distinct p.products_id, p.products_model, p.master, 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 = '3985' and p.products_status = '1' and p.master in (1,2) ) union all ( select distinct p.products_id, p.products_model, p.master, 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.products_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.xsell_id = '3985' and p.products_id != '3985' and p.products_status = '1' and p.master in (1,2) ) order by p.products_id asc limit 10

[TEP STOP]