23 October 2008


#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 ...

Is it MySQL or phpMyAdmin (arrrrgh - its hacking me off either way!) I've been trying to add an auto_increment field on a table for 10 minutes and keep getting the following error:

#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 'ADD INDEX ('my_field')' at line 1
I know my sql is correct. So what the uck is it???
What a frigging joke. The problem seems to be that I am using ' instead of ` (can you tell the difference?)
If you use a slanted apostrophe the command works... go figure!!!
ADD INDEX (`my_field`)

2 comments:

Anonymous said...

Please help me out. I got th error:

==============
#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
=============
Any help will be appreciated.Thanks!
(snu703@gmail.com)

News Bot said...

Hi snu073, you need to be a bit more specific with you details.

Can you send details of what you were trying to do and the sql you were using?

Regards