Hi - I'm using the ADODB database library for PHP-database access
I'm not sure if I'm missing something, but ADODB (I'm using version 1.40) seems to have a big problem when it encounters a field which has a value NULL.
An example - I want to display the prefix (e.g. Dr., Prof. etc.) and the name of people (where the prefix is a seperate field in the MySQL 3.23 database I'm retrieving the information from).
So the code I'm using is:
echo $PartDetail->Fields("prefix")
echo $PartDetail->Fields("first_name");
echo $PartDetail->Fields("last_name");
If a particular record has values for all these fields, all is well and the information displays correctly
However, not everyone uses a prefix, so this is often a NULL value. When this happens I get the error:
"Warning: Undefined index: prefix in D:\Inetpub\wwwroot\projects\adodb\adodb.inc.php on line 1363"
The line in question is:
return $this->fields[$colname];
If it was just a question of checking for a NULL value etc in my code before displaying, that wouldn't be a problem - but even trying to check the value of $PartDetail->Fields("prefix") throws up this error!
How are you meant to deal with NULL value fields in ADODB? The only way I can see to do it would be to edit the ADODB code, but that can't be right
Any help would be very much appreciated!
cheers
Paul