I am a bit new to MySQL and just wanted to know what is the difference between:
` \' \"
when I\'m using them in a query.
http://dev.mysql.com/doc/refman/5.1/en/string-literals.html
http://dev.mysql.com/doc/refman/5.1/en/identifiers.html
With ` you write mysql variable names. With ' you write mysql variable values
For example
SELECT * FROM `test` WHERE `x` = '1'
I would add that the way double quotes are interpreted depend of wether or not your MySQL
server has ANSI quotes turned on or off.
In the former you cannot use double quotes as a string delimiter.
SELECT name FROM user WHERE last_name = "norris" ;
will return you a punch in your teeth.
``quotes you dont need to escape where as string quotes you do ''single or ""double
use ` (backquotes) for column name
use ' or " for values
Don't use backticks with column values. use either single or double quotes otherwise mysql considered that value as a column name.