troubleshooting Question

Show text if column value is NULL

Avatar of BrighteyesDesign
BrighteyesDesignFlag for Afghanistan asked on
PHP
2 Comments1 Solution370 ViewsLast Modified:
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

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?


results
ASKER CERTIFIED SOLUTION
Neil_Bradley
Web UX/UI Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros