Solved

#1064 - You have an error in your SQL syntax

Posted on 2006-10-23
8
4,548 Views
Last Modified: 2008-03-10
Hi,

I have read all previous post relating to this, but I am still unable to get my head around the problem and need a little hand holding.

I exported a db before having a server turned off. On a new server I am now trying to import the db via phpMyAdmin.

Unfortunately I do not have access to the old derver to make another backup in a compatible mode.

Here is the error I am getting, is all lost?

Thanks,

Luv2.


Error

SQL-query :  

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 defaultCURRENT_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',
`newsFile` varchar( 5 ) NOT NULL default '',
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 =193DEFAULT CHARSET = latin1

MySQL said:


#1064 - You have an error in your SQL syntax near 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `HITS` int(11) NOT NULL default' at line 8




0
Comment
Question by:Luv2Muff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
8 Comments
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 250 total points
ID: 17791349
what version of MySQL are you running. this error looks like you have a version that is older to when the syntax CURRENT_TIMESTAMP is supported
0
 
LVL 33

Expert Comment

by:snoyes_jw
ID: 17791357
It also looks like you're missing a space between 'default' and 'CURRENT_TIMESTAMP'
0
 

Author Comment

by:Luv2Muff
ID: 17791438
How do I insert the missing space?

I am completely new at this I copied all the SQL into an SQL window, added the space, but still get the same error :-(

Thanks,

Luv2
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

Author Comment

by:Luv2Muff
ID: 17791510
Oh hell, it did not look like that when I submitted, just had 300 lines of code. Will write to support to seee if they can remove the above.
0
 

Author Comment

by:Luv2Muff
ID: 17791596
New server is running:

MySQL 3.23.58
0
 
LVL 33

Accepted Solution

by:
snoyes_jw earned 250 total points
ID: 17791721
3.23 is really old.  It's time to upgrade.
0
 

Author Comment

by:Luv2Muff
ID: 17885411
Apologies for the late response. I have divided the points as that seemed fair. The correct answer was to upgrade. Thanks for your help.
0

Featured Post

Get Database Help Now w/ Support & Database Audit

Keeping your database environment tuned, optimized and high-performance is key to achieving business goals. If your database goes down, so does your business. Percona experts have a long history of helping enterprises ensure their databases are running smoothly.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question