PDA

View Full Version : 1054 and ' vs `?


oc_earthling
05-11-2005, 06:56 AM
I keep getting a 1054 error when I try to paste an SQL statement from notepad into the SQL box on PHPMyAdmin.

I found the syntax on another page, copied it, and modified the values, and it works, with the 3 that I tried, but I have a huge list and I do not want to hand enter them!

It seems like there is something weird going on with the ' single quote vs the ` back-tick, does anyone know what the dealio is with that? It is making me nutso, I have been looking everywhere and just everything is way vague, does someone have a simple answer or work-around?

celestine
05-11-2005, 09:55 AM
Maybe its the collation difference? I ran into a similar problem in MSSQL and found out its a collation difference. Not sure if this may help.

In any case ' is used for surrounding values like select * from table where field='value' and ` is used for field, table names like select * from `table`. Hope this helps, I'm not too sure as well.

NancyJ
05-11-2005, 02:02 PM
` is only require to surround tables names when those tables are the name of reserved words in sql. eg char would need to be `char`. ' is used to surround non integer values