Dates in DataObject
| From: | Rodrigo Alvarez Fernández | Date: | Thu, 30 Dec 2004 09:44:28 +0000 |
| Subject: | Dates in DataObject | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-16512@lists.php.net to get a copy of this message | ||
Hi PEARs,
I have a 'created' datetime field, that onInsert, it gets current date and time:
function insert()
{
require_once 'DB/DataObject/Cast.php';
$this->created = DB_DataObject_Cast::sql('NOW()');
}
I want that onUpdate, leave this as it is. How can I do this?
Thanks,
Rodrigo.