Error #1064

Reply

Join Date: Sep 2008
Posts: 2
Reputation: anuragg21 is an unknown quantity at this point 
Solved Threads: 0
anuragg21 anuragg21 is offline Offline
Newbie Poster

Error #1064

 
0
  #1
Jan 3rd, 2009
While i was importing .sql file in my database i got this error #1064.

  1. #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 'CREATE TABLE IF NOT EXISTS `att_poll_log` (
  2. `id` INT(10) UNSIGNED NOT NULL au' at line 4
  3.  

The actual code written in .sql file is:

  1. CREATE TABLE IF NOT EXISTS `att_poll_log` (
  2. `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  3. `news_id` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  4. `member` VARCHAR(30) NOT NULL DEFAULT '',
  5. PRIMARY KEY (`id`),
  6. KEY `news_id` (`news_id`,`member`)
  7. ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=19 ;

Please help this out.
Last edited by anuragg21; Jan 3rd, 2009 at 4:42 pm.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 276
Reputation: kanaku is on a distinguished road 
Solved Threads: 15
kanaku's Avatar
kanaku kanaku is offline Offline
Posting Whiz in Training

Re: Error #1064

 
0
  #2
Jan 4th, 2009
Hallu! this page says something about reserved words being used in your query. It also says that this is sometimes caused by a mySQL version mismatch and provides a tip for exporting your database using phpMyAdmin to prevent this error.

Their link to reserved words is outdated. Try this one.
If you know ASP, you can save other daniweb members from idiots like me by helping out in this forum.

Visit this thread
if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 2
Reputation: anuragg21 is an unknown quantity at this point 
Solved Threads: 0
anuragg21 anuragg21 is offline Offline
Newbie Poster

Re: Error #1064

 
0
  #3
Jan 4th, 2009
@ kanaku
Can you please point it out which reserved keyword i have used.
MySQL ver. - 5.0.51
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 276
Reputation: kanaku is on a distinguished road 
Solved Threads: 15
kanaku's Avatar
kanaku kanaku is offline Offline
Posting Whiz in Training

Re: Error #1064

 
0
  #4
Jan 8th, 2009
Sorry.. I tried running your query in my localhost (5.0.67) and it didn't generate any error.
If you know ASP, you can save other daniweb members from idiots like me by helping out in this forum.

Visit this thread
if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MySQL Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC