FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


MySQL error





mtorregiani
Hi

I was trying to import a .sql database using phpmyadmin (I made a new database and I tried to import my old one there), but I received some MySQL error:

Code:
#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 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `HITS` int(11)



What's the meaning of that, what do I have to change?

Thanks in advance.
coeus
What is the full sql statement? (not the file, just the statement that error stems from)
mtorregiani
This is all I think:

Code:
CREATE TABLE `PLD_CATEGORY` (

`ID` int( 11 ) NOT NULL AUTO_INCREMENT ,
`TITLE` varchar( 100 ) NOT NULL default '',
`TITLE_URL` varchar( 100 ) default NULL ,
`DESCRIPTION` varchar( 255 ) default NULL ,
`PARENT_ID` int( 11 ) NOT NULL default '0',
`STATUS` int( 11 ) NOT NULL default '1',
`DATE_ADDED` timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
`HITS` int( 11 ) NOT NULL default '0',
`SYMBOLIC` int( 11 ) NOT NULL default '0',
`SYMBOLIC_ID` int( 11 ) NOT NULL default '0',
PRIMARY KEY ( `ID` ) ,
KEY `PLD_CATEGORY_TITLE_IDX` ( `TITLE` ) ,
KEY `PLD_CATEGORY_TITLE_URL_IDX` ( `TITLE_URL` ) ,
KEY `PLD_CATEGORY_DESCRIPTION_IDX` ( `DESCRIPTION` ) ,
KEY `PLD_CATEGORY_PARENT_ID_IDX` ( `PARENT_ID` ) ,
KEY `PLD_CATEGORY_STATUS_IDX` ( `STATUS` ) ,
KEY `PLD_CATEGORY_HITS_IDX` ( `HITS` )
) ENGINE = MYISAM AUTO_INCREMENT =196 DEFAULT CHARSET = latin1;



MySQL ha dicho: 

#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 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `HITS` int(11)
vinx_18
You may need this link to solve your problem... http://dev.mysql.com/doc/refman/5.0/en/timestamp-4-1.html
Fire Boar
Re-export your SQL schema, but before you click "save", look under "compatability" and set it to "MySQL 4 compatability mode". You've got some MySQL 5 syntax in that query and unfortunately Frihost doesn't have higher than MySQL 4. Turning on compatability mode will fix that.
Related topics
Mysql error!
MySQL error 1604
[solved] Weird mysql error
Suppressing mysql error
[mySQL] Error I cannot Debug
MySql error: Column count doesn't match value count at row 1
Mysql Error
MySQL error
Error connecting to mysql ; please help
Mysql error: Warning: mysql_num_rows():
mysql error
Urgent! MySQL error!
MYSQL Ajax im Installation Error
Mysql ERROR
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.