9 messages in com.mysql.lists.mysqlTIMESTAMP field not automatically upd...
FromSent OnAttachments
Ferindo Middleton Jr30 Mar 2006 17:16 
Scott Haneda30 Mar 2006 17:24 
jonathan30 Mar 2006 17:25 
Ferindo Middleton Jr30 Mar 2006 18:10 
Hank31 Mar 2006 05:58 
Barry31 Mar 2006 06:04 
Ferindo Middleton Jr31 Mar 2006 16:20 
Ferindo Middleton Jr31 Mar 2006 16:30 
Jonathan Mangin02 Apr 2006 07:42 
Subject:TIMESTAMP field not automatically updating last_updated field
From:Ferindo Middleton Jr (fmid@verizon.net)
Date:03/30/2006 05:16:48 PM
List:com.mysql.lists.mysql

I think I've seen this complaint posted before but I ignored but now I realize that in some of my db tables' last_updated field the value is automatically updating on UPDATEs to records while in other tables the last_updated fields for some strange reason aren't automatically updating.

I'll usually use the following line in my table declarations:

last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,

In some tables it automatically updates on subsequent updates to the table and in others it will not. The purpose here is to have the last_updated field automatically append to the current timestamp... the application on the front end doesn't specify the time to MySQL but rather expects that it's always going to be UPDATEd to the current time slot.

What am I doing wrong what command should I issue to my tables to correct it? Thanks

Ferindo