Log in
Cart (0)
(INCL. GST)
Total: $0.00
Go to cartCheckout
1064 - 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 ') and pd.products_id = p.products_id and pd.language_id = '1' and p.products_s' at line 1

SELECT * FROM (SELECT distinct p.products_ship_free, p.products_image, p.products_catalog_image as products_small_image, pd.products_name, p.products_id, p.manufacturers_id, p.products_price, p.products_wholesale_price, p.products_recommended_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_new_arrival, p.products_date_added, p.products_ordered, p.products_ordered_recently, p.products_newest, p.products_on_special FROM osc_products p INNER JOIN osc_products_to_categories p2c ON p2c.products_id=p.products_id and (p2c.categories_id = '21') left join osc_categories c on p2c.categories_id = c.categories_id left join osc_manufacturers m on p.manufacturers_id = m.manufacturers_id left join osc_specials s on p.products_id = s.products_id, osc_products_description pd WHERE (c.categories_status = '1' or c.categories_id= ) and pd.products_id = p.products_id and pd.language_id = '1' and p.products_status = '1' ORDER BY products_ordered_recently DESC, products_ordered DESC) as p2 ORDER BY products_newest DESC, CASE WHEN products_newest = 0 and products_on_special = 0 and @popularity < 8 THEN (@popularity:=@popularity+1) ELSE 12 END ASC, products_ordered_recently DESC, products_ordered DESC

[TEP STOP]