1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' 1, 0) as same_manufacturer from products_xsell xp left join products p on ' at line 2

( select distinct p.products_id, p.products_model, p.master, p.products_date_available, 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, ptc.categories_id, cd.categories_name, IF(p.manufacturers_id = , 1, 0) as same_manufacturer 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 left join products_to_categories ptc on ptc.products_id = p.products_id left join categories c on ptc.categories_id = c.categories_id left join categories_description cd on cd.categories_id = c.categories_id where xp.products_id = '48' and p.products_status = '1' and p.master in (1,2) ) union distinct ( select distinct p.products_id, p.products_model, p.master, p.products_date_available, 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, ptc.categories_id, cd.categories_name, IF(p.manufacturers_id = , 1, 0) as same_manufacturer 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 left join products_to_categories ptc on ptc.products_id = p.products_id left join categories c on ptc.categories_id = c.categories_id left join categories_description cd on cd.categories_id = c.categories_id where xp.xsell_id = '48' and p.products_id != '48' and p.products_status = '1' and p.master in (1,2) ) order by categories_name desc, same_manufacturer desc, products_name asc

[TEP STOP]