NYCPHP Meetup

NYPHP.org

[nycphp-talk] mysql: timestamp issue?

Kristina Anderson ka at kacomputerconsulting.com
Wed Jul 2 00:34:30 EDT 2008


I think the default is to insert the current timestamp on creation of 
new row and not change that value even if row is updated... ?

I remember I had some fun with phpMyAdmin trying to figure out how they 
had this set up.

-- Kristina

> > `edi_updated` timestamp NOT NULL default CURRENT_TIMESTAMP on update
> >  CURRENT_TIMESTAMP,
> 
> Shouldn't it auto update by default?
> 
> alter table <tablename> modify edi_updated timestamp NOT NULL;
> 
> Wouldn't that auto update it anyway?
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
> 
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
> 
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
> 
> 





More information about the talk mailing list