In my application (osCommerce) I had to modify a query that look like this: SELECT sql_cache distinct p.products_image, p.products_subimage1, pd.products_name, p.products_quantity, p.products_model, p.products_ordered, p.products_id, p.products_price, p.products_date_added, p.products_weight, p.products_length, p.products_width, p.products_height, p.products_tax_class_id, p.products_status, 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)…