List:General Discussion« Previous MessageNext Message »
From:Jim Grill Date:September 9 2004 6:09pm
Subject:Re: when to use backquote in SQL
View as plain text  
> In the last episode (Sep 09), leegold said:
> > Could anyone link me or explain the purposes of backquotes in an SQL
> > statement. I tried searching the manual and googling it but couldn't
> > find a simple explaination. ``` vs. "regular" single quotes'''.
> > Thanks, Lee G.
>
> Backquotes are used to delimit table or field names; they aren't used
> to delimit SQL strings the way ' or " are.  You'll almost never need to
> use them unless you have spaces or other strange characters in your
> table/field names.
>
> -- 
> Dan Nelson
> dnelson@stripped
>

Backtics can also be useful to avoid SQL injections if an application your
working on requires table names or field names to be supplied from user
input (always a bad idea) like a select box.

Jim Grill



Thread
fulltext usage for specific keywordsleegold7 Sep
  • Re: fulltext usage for specific keywordsThomas Spahni7 Sep
  • Re: fulltext usage for specific keywordsSGreen7 Sep
    • when to use backquote in SQLleegold9 Sep
      • Re: when to use backquote in SQLDan Nelson9 Sep
        • Re: when to use backquote in SQLFagyal Csongor9 Sep
          • Re: when to use backquote in SQLDan Nelson9 Sep
      • Re: when to use backquote in SQLSGreen9 Sep
    • Re: when to use backquote in SQLJim Grill9 Sep