I have an Access database (yetch) from which I am retrieving a recordset. One of the text fields in the recordset has a few null values. I need to display all records (so I can't just eliminate these records in the SQL), but display a blank or alternative string for the null values.
If I try any string handling function on the null-valued variable, it chokes and gives me this:
Catchable fatal error: Object of class variant could not be converted to string in C:\Inetpub\wwwroot\Comed2005\category.php on line 193
I have no control over the database (long story), so I can't change the default value for the field.
I have tried inspecting the variable using empty() isset() is_null() ===null and a few other home-grown functions that I have found on other forums. None of these seem to be able to tell the difference between the null values, and those with something in them. I also tried using if(method_exists($fee, "__tostring")) but with no joy. The variables are all variant objects, and I can only tell which ones are null because all string functions choke on them.
Any suggestions gratefully received...