View Full Version : Quotes in the Query
I have recently found that different types of quotes work for me...
Basicly when should quotes be used, like ` or ', and how?
Thanks
Jeewhizz
07-08-2003, 04:45 AM
backquotes should be used to quote a table, field or database name:
SELECT `table`.`field`,`table2`.`field`FROM `table`,`table2`
You use the normal single quotes when you are quoting a varialbe in PHP for example:
SELECT `table`.`field`,`table2`.`field`FROM `table`,`table2` WHERE `table`.`field` = '$variable'
Jee
Spookster
07-08-2003, 07:44 AM
Originally posted by Jeewhizz
You use the normal single quotes when you are quoting a varialbe in PHP for example:
only if that variable is suppose to be a string otherwise you should not quote it.
Jeewhizz
07-08-2003, 12:04 PM
Cheers bud ;)
Cool. Thanks for clearing that up for me :thumbsup:
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.