You are here: Re: How do I escape parentheses in a mysql query? « PHP Programming Language « IT news, forums, messages
Re: How do I escape parentheses in a mysql query?

Posted by Jerry Stuckle on 07/16/07 01:03

Andy Hassall wrote:
> On Sun, 15 Jul 2007 20:31:54 -0400, Jerry Stuckle <jstucklex@attglobal.net>
> wrote:
>
>>> You should use single quotes for strings in SQL, not double quotes. Double
>>> quotes are supposed to be for quoting table and column names ("identifiers").
>>> MySQL can, in some cases, accept either, but you should stick with the right
>>> one to avoid potential trouble, and to stay closer to standard SQL conventions.
>> No back ticks are for quoting table and column names. Double quotes are
>> a non-standard MySQL extension to the spec (and will fail if MySQl is
>> running in strict ANSII SQL mode).
>
> Other way around. Backticks are a non-standard MySQL extension. The standard
> is double quotes.
>

Andy,

Nope, actually both are non-standard extensions. Quotes have no
definition in standard SQL. Rather, table/column names can't be
reserved words like GROUP, COLUMN, etc.

The backticks just give an extension to allow this (rather poor, IMHO)
ability. It's another non-standard extension.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация