Re: Incorrect integer value ''
Hello Bakers, this problem was issued in another post: http://tinyurl.com/6oeb9z But it's not possible to answer anymore. This issue still seems not be resolved. Could anyone find the corresponding ticket on trac? Regards, Christoph :-) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Incorrect integer value ''
When I create a record with a form and leave integer fields empty, Cake tries to insert '' into that field instead of null, leading to the error "SQL Error: 1366: Incorrect integer value: '' for column 'year' at row 1"." Now this is easily fixed by putting this in my controller for every field before saving: if ($this->data['Text']['year'] == '') $this->data['Text'] ['year'] = null; But this is quite a hassle so I wonder if there's a way to get Cake to use null instead of '' for integer fields? Tia. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---