Link to home
Start Free TrialLog in
Avatar of BrighteyesDesign
BrighteyesDesignFlag for Afghanistan

asked on

Show text if column value is NULL

I use this query to display thumb results.

SELECT properties.propertyID, properties.pricePrefix, images.selected, properties.memberID, properties.live, properties.country_code, images.filename, properties.name, FORMAT(properties.prices,0) as prices, properties.currency FROM properties INNER JOIN images ON properties.propertyID=images.propertyid WHERE properties.cityCode = '$cityCode' AND (properties.saleOrRent = '$saleOrRent' or '$saleOrRent' = '') AND images.selected = '1' AND properties.memberID ='$userid' ORDER by properties.prices ASC

Open in new window


There's a column called 'live'. If this column has the value '1' the property (it's a real estate site) is live. If it's '0' the property is incomplete and not live.

On the thumb results I want to display the text  - "Property not live - incomplete" if the live column is NULL.

Any ideas how to achieve this?


User generated image
ASKER CERTIFIED SOLUTION
Avatar of Neil_Bradley
Neil_Bradley
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BrighteyesDesign

ASKER

Perfect, cheers!