Re: Enclosing fields in MySQL queries with `" or '

From: Date: Tue, 13 Mar 2007 08:09:29 +0000
Subject: Re: Enclosing fields in MySQL queries with `" or '
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-250395@lists.php.net to get a copy of this message
On 13/03/07, Richard Lynch <ceo@l-i-e.com> wrote:
On Wed, March 7, 2007 1:22 pm, Dotan Cohen wrote:
A backtick (`) on the other hand is a mysql-ism. It allows you to use keywords as field names (eg index) amongst other things (including quoting strings).
I *think* that this is actually SQL-92 specification, but don't quote me on that. You can use foo to make the SQL parser know that foo is not a reserved word but an identifier...
I'm usually careful not to name my fields "select", "from", "where", and the like. But if I ever need it, now I know. Thanks. Dotan Cohen http://lyricslist.com/lyrics/artist_albums/646/tesla.html http://what-is-what.com/what_is/wikipedia.html

« previous php.general (#250395) next »