ok, the same code works for my approved field. so it is sometihing to do with the spam column. i checked it is a tinyint(1).
still stuck though. On Oct 10, 1:31 pm, "#2Will" <[email protected]> wrote: > Hi, when i try and save to my tinyint(1) field, i the sql is turning > the value to Null, seemingly whatever i do. What am i doing wrong? > > I am doing stuff like this: > > $this->Comment->read(null, $key); > $this->Comment->saveField('spam', 1, false); > > or > > $data = array('Comment'=>array('id'=>$key, 'spam'=>true)); > $this->Comment->save($data); > > Both give me the follwing sql: > > UPDATE `comments` SET `spam` = NULL, `modified` = 1255141309 WHERE > `comments`.`id` = 17 > > I have tried variants of 1, true '1' yes > > please help! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
