Boolean data types and Creole

DrSlump <[email protected]>
Newsgroups gmane.comp.php.pear.liveuser
Message-ID <[email protected]>
Hi,

I've implemented auth and perm drivers for the Creole library. I have a 
doubt though, MDB2 seems to use a CHAR(1) type (at least for MySQL) to 
repressent a boolean value. It can be 'Y' or 'N' depending on if it's 
true or false respectively. However Creole will return true for any 
character which is not an space or '0', basicly it casts to bool the 
field value.
The problem is that the 'N' used by MDB2 will be handled as true by 
Creole. This shouldn't be a problem if the tables are to be created and 
used by the same drivers but if they are created by one of them and then 
used later by another this can cause unexpected results.

So, should I modify the Creole drivers to check for the 'N' as a value 
for false or should all the DB drivers (in liveuser_admin I suppose) 
threat boolean fields in the same way?

As a side note, I'm going to implement support for Creole in 
liveuser_admin. That seems a more complex task though, so I'm wondering 
if there are some unit tests already made for that package :)

cheers,
Iván Montes
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.