Youbeli Online Shopping Malaysia
Don't have an account? Sign Up
Cart: 0 items 
Language
Contact Us: 1800 88 2354
Search
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 (IF(s.specials_status = '1' and s.specials_display = 1, s.specials_price, p.' at line 2

select SQL_CACHE distinct pd.products_info, m.manufacturers_id, p.products_id, p.products_display, p.products_image, p.products_image_full, pd.products_name, p.products_price, p.products_tax_class_id, IF(s.specials_status = '1' and s.specials_display = 1, s.specials_price, NULL) as specials_price, IF(s.specials_status = '1' and s.specials_display = 1, s.specials_price, p.products_price) as final_price, p.products_date_available as date_expected, p.products_bar_code, p.products_ship, p.classified, p.stores_id from products p left join manufacturers m using(manufacturers_id) left join specials s on p.products_id = s.products_id left join stores_profile sp on sp.id = p.stores_id and sp.stores_status = 1 left join stores_package pac on sp.package = pac.id left join products_to_categories p2c on p2c.products_id = p.products_id left join products_description pd ON pd.products_id = p.products_id where p.stores_id = '12' and and (IF(s.specials_status = '1' and s.specials_display = 1, s.specials_price, p.products_price) >= 5) and (IF(s.specials_status = '1' and s.specials_display = 1, s.specials_price, p.products_price) <= 10) and p.products_status = '1' and p.approval = '1' group by p.products_id order by pac.sort_order desc, pd.products_name

[TEP STOP]