On Apr 5, 2011, at 04:33, cakey wrote:

> I have a model with a few tinyint(1) fields. I use this simple find:
> $this->Model->find('all'). But the tinyint fields are returned like
> this with var_dump:
> 
> ["enabled"]=>
>      string(1) "1"
> 
> This is the field in the table:
> 
> `enabled` tinyint(1) NOT NULL DEFAULT '1',
> 
> 
> This is what the docs tell me at 
> http://book.cakephp.org/nl/view/1003/Data-Type-Associations-by-Database
> :
> A tinyint(1) field is considered a boolean by CakePHP.
> 
> 
> What am I doing wrong? Where should I look to fix this?

Any difference if you make it an *UNSIGNED* tinyint(1)?



-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to