Cakephp sometimes doesn’t save created or updated
This one got me busy this afternoon :)
CakePHP wouldn’t save the created and updated fields, they were just filled with zeroes (0000-00-00 00:00:00). Finally i did what i was supposed to do a lot earlier, i searched the trac and i found the solution.
It’s all about how you set up your MySQL tables, you need to set the created and updated fields to NULL and set the default value to NULL too.
![]()
This way it works like a charm!


2 Comments
comments rss [?] | trackback uri [?]Thanks for the solution
I knew this at one time, but then I forgot it. Googled it and your solution came up. Thanks!
Submit your comment
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>