Order by

I have a listing with properties. Right now I have ORDER BY property_price ASC. The point is, a property can be a special Offer (offer_price). if that is the case for that particular property the normal price(property_price) should not longer be counted for the ORDER BY, instead the offer_price should be the price! Is this possible?

Thank you in advance

     WHEN special offer THEN offer_price
     ELSE property_price

if the existence of a special offer depends on whether the offer_price is null or not null, use this –

ORDER BY [COLOR="Blue"]COALESCE(offer_price,property_price)[/COLOR]

and some people say they don’t like NULLs! crazy, i tell ya!