NYCPHP Meetup

NYPHP.org

[nycphp-talk] mysql: timestamp issue?

Marc Antony Vose suzerain at suzerain.com
Tue Jul 1 18:03:16 EDT 2008


Hi there.

I exported this create table statement from an existing table of  
mine.  I was just wondering if someone would enlighten me as to why my  
"edi_updated" timestamp column is not auto-updating when a record is  
updated?

Cheers,

Marc


CREATE TABLE `editions` (
   `edi_id` int(10) unsigned NOT NULL auto_increment,
   `edi_title` int(10) unsigned default NULL,
   `edi_platform` int(11) unsigned default NULL,
   `edi_description` text,
   `edi_date_release` date default NULL,
   `edi_price` int(11) default NULL,
   `edi_price_metered` int(11) default NULL,
   `edi_price_metered_unit` enum('month','game','hour','year') default  
NULL,
   `edi_votes` int(11) default NULL,
   `edi_vote_total` int(11) default NULL,
   `edi_added` datetime default NULL,
   `edi_updated` timestamp NOT NULL default CURRENT_TIMESTAMP on  
update CURRENT_TIMESTAMP,
   `edi_id_old` int(10) unsigned default NULL,
   `edi_released` enum('y','n') NOT NULL default 'n',
   `edi_date_release_precision` enum('year','month','day','unknown')  
NOT NULL default 'year',
   `edi_active` enum('y','n') NOT NULL default 'n',
   `edi_featured` enum('y','n') NOT NULL default 'n',
   `edi_vintage` enum('y','n') NOT NULL default 'n',
   PRIMARY KEY  (`edi_id`)
) ENGINE=MyISAM AUTO_INCREMENT=3787 DEFAULT CHARSET=latin1  
AUTO_INCREMENT=3787 ;




More information about the talk mailing list