vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| Your missing your data type for the spdate_updated attribute 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 timestamp default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ); -----Original Message----- From: Hiep Nguyen [mailto:hiep@ee.ucr.edu] Sent: Thursday, November 29, 2007 8: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/mysql?unsub=joe@piscitella.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.16.6 - Release Date: 11/24/2007 12:00 AM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.16.6 - Release Date: 11/24/2007 12:00 AM |
| ||||
| 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:hiep@ee.ucr.edu] > 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/mysql?unsub=jschwartz@the- > infoshop.com |
| Thread Tools | |
| Display Modes | |
|
|