How can i save a date created plus 31 days?
I have
$expires = date("Y-m-d H:i:s");
$expires = strtotime(date("Y-m-d H:i:s", strtotime($expires)) . " +31 days");
$this->Post->id = $id;
$expires = strtotime(date("Y-m-d H:i:s", strtotime($expires)) . " +31 days");
$this->Post->id = $id;
$this->Post->saveField('expires', '$expires');
DB is always 0000-00-00 00:00:00
field in db is expires, Datetime
Thanks
D
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment