Re: Dates in DataObject

From: Date: Thu, 30 Dec 2004 09:51:04 +0000
Subject: Re: Dates in DataObject
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16513@lists.php.net to get a copy of this message
Ok, after using DO's Cast and a lot of strange things, it seems that this is enough: function update($do = false) { unset($this->created); parent::update(); } On Thu, 30 Dec 2004 10:44:28 +0100, Rodrigo Alvarez Fernández <papipo@gmail.com> wrote: > 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. >

« previous php.pear.general (#16513) next »