WingedPanther said:
SQL doesn't work that way. You can usually test whether a field was null after you return it, but in advance, the database doesn't know whether your query will return 1 record or 100. There is nothing about the statement itself to indicate it either way. If it returns 100 records, then do you want each record to contain different fields, based on which are not null for that record, or just the ones that are not null for ALL records.
Thanks for that help. What is the best way to do this? Basically I have some PHP code that displays all the fields on a page and the values next to them. For example "Location: USA" with location being the field name and USA being value. I want to show all the fields, but exclude the ones that are empty or null. What is the best method to do this?
Thanks