Member Avatar for anuragg21

While i was importing .sql file in my database i got this error #1064.

#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` (
`id` int(10) unsigned NOT NULL au' at line 4

The actual code written in .sql file is:

CREATE TABLE IF NOT EXISTS `att_poll_log` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `news_id` int(10) unsigned NOT NULL default '0',
  `member` varchar(30) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `news_id` (`news_id`,`member`)
) ENGINE=MyISAM  DEFAULT CHARSET=cp1251 AUTO_INCREMENT=19 ;

Please help this out.

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.

Member Avatar for anuragg21

@ kanaku
Can you please point it out which reserved keyword i have used.
MySQL ver. - 5.0.51

Sorry.. I tried running your query in my localhost (5.0.67) and it didn't generate any error. :(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.