NYCPHP Meetup

NYPHP.org

[nycphp-talk] Modified and created times using DB_DataObject

Mike Brittain mike at mikebrittain.com
Sun Nov 27 18:38:57 EST 2005


Jeff Loiselle wrote:
> Wouldn't it be easiest to set that in the database? For example,
> MySQL's timestamp data type is auto-set when you create and update a
> record I believe.

I had considered a timestamp for the modified column, and currently have 
that in place.  I am also thinking that if the application could handle 
this on it's own, then it wouldn't be exposed to automatic changes in 
timestamp if I had to do manual administration on the database tables.

Also, the "created" column can't be a timestamp, otherwise it will 
update every time the record is changed.  I want this column to reflect 
only its own creation time.

-- 
Mike Brittain
ID Society, Inc.
www.idsociety.com



More information about the talk mailing list