i have a problem. I need to find out, how to put OR in this order:
SELECT ROUND(o.`total_products` / c.`conversion_rate` -
(SUM(IF(pa.wholesale_price = "0" , p.wholesale_price,
pa.wholesale_price)*od.product_quantity)))
And I need to put OR together with "0" like this:
SELECT ROUND(o.`total_products` / c.`conversion_rate` -
(SUM(IF(pa.wholesale_price = "0" OR "IS NULL", p.wholesale_price,
pa.wholesale_price)*od.product_quantity)))
I want this result: If pa.wholesale_price is zero or row does not exist, use p.wholesale_price. If pa.wholesale_price exist, use pa.wholesale_price.
Can anybody help me?