I’m trying to follow a mysql tutorial from The New Boston on youtube. However, I have a problem with the sql panel in phpmyadmin interprets text in quotes as columns. In my version of phpMyadmin, (Server version: 5.1.55,Protocol version: 10,MySQL client version: 5.1.55)I did not see a way to turn this off.
Please see images from this link http://leobee.com/android/push/phpmyadminerrors.html
In phpMyAdmin columns can have quotes or be without quotes in sql queries:
See Image 1 and Image 2
The error 1054 unknown column for the name of a city (which is a string):
See Image 3
I get an error 1064 error in syntax when I escape the string:
See Image 4
I also get and error when the quotes are removed from around the string for the city (which is correct).
The error log says it’s a syntax error, but it is not. How do I get the application to use quotes only for strings?
PhpMyAdmin, like MySQL uses both quotes and back-ticks. Both are different and shouldn’t be used interchangeably.
Back-ticks are used for columns or tables:
Using a single quote will throw an error:
Single quotes should be used for strings. Any additional quotes inside should be properly escaped:
Improperly escaping quotes will throw an error:
Hope that helps!