Hi


Some of you might feel bugged when trying to access an TINYINT(1)
field in mysql with values different from 0 or 1.

It happens that CakePHP thinks TINYINT(1) is BOOLEAN. Therefore, 0 is
0/False and anything else but zero is 1/TRUE.

If it ever happens to you, you have two options.


First, you may change the field type to INT(1) -- which will wok
although it might change the way MySQL handle data.

Second, you may dike out the lines:
                if (($col == 'tinyint' && $limit == 1) || $col == 'boolean') {
                        return 'boolean';
                }
AND
                'boolean' => array('name' => 'tinyint', 'limit' => '1')

>From cake/libs/model/datasources/dbo/dbo_mysql*.php


I hope it helps some of you.


Dérico.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to