MySQL Forums
Forum List  »  InnoDB

Re: Self-updating timestamp?
Posted by: Ted Roche
Date: January 20, 2005 01:37PM

Upon retest, I still see the same problem. The table is created with:

CREATE TABLE User
(
iUserPK BIGINT(20) NOT NULL AUTO_INCREMENT,
cUserName CHAR(25) NULL,
cUserInitials CHAR(10) NULL,
lActive ENUM('Y','N') NULL,
lAdmin ENUM('Y','N') NULL,
tChanged TIMESTAMP(10) NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (iUserPK)
)
TYPE= InnoDB
;

INSERT INTO USER (cUserName, cUserInitials, lActive, lAdmin) VALUES ("Ted Roche", "tr", "Y", "Y") ;

correctly generates the Primary Key and tChanged Timestamp. However, when I issue:

UPDATE User SET cUserInitials = "TR" WHERE cUserName = "Ted Roche";

The initials change, the but the tChanged field does not. What am I missing?

Ted Roche, MCSE, MCSD
Ted Roche & Associates, LLC
http://www.tedroche.com

Options: ReplyQuote


Subject
Views
Written By
Posted
7736
January 18, 2005 04:44PM
3439
January 19, 2005 08:51AM
3186
January 19, 2005 02:47PM
Re: Self-updating timestamp?
3050
January 20, 2005 01:37PM
3195
January 20, 2005 02:52PM
3217
January 20, 2005 07:46PM
2991
January 21, 2005 08:15AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.