I think you are missing the data type for spdate_updated. Regards,
Jerry Schwartz The Infoshop by Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 www.the-infoshop.com www.giiexpress.com www.etudes-marche.com > -----Original Message----- > From: Hiep Nguyen [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 29, 2007 10:24 AM > To: mysql@lists.mysql.com > Subject: repost timestamp for update & insert > > i asked this question before, but when i tried what D.Vin suggested, i > got > an error. > > mysql version is 4.1.12 > > i tried: > > CREATE TABLE tbl_spdate( > spdate_ID int NOT NULL PRIMARY KEY AUTO_INCREMENT , > spdate_date date NOT NULL , > spdate_notes varchar( 100 ) , > spdate_created timestamp default 0, > spdate_updated default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP > ); > > and i got this: > > #1064 - You have an error in your SQL syntax; check the manual that > corresponds to your MySQL server version for the right syntax to use > near > 'default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP > )' at line 7 > > am i have a wrong version? > > Thanks, > T. Hiep > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > infoshop.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]