[Phpmyadmin-devel] backquotes in SQL query

Michal Čihař michal at cihar.com
Tue Aug 16 12:33:26 CEST 2011


Dne Tue, 16 Aug 2011 10:49:02 +0200
Dieter Adriaenssens <dieter.adriaenssens at gmail.com> napsal(a):

> I noticed Piotr removed back quotes from a few fields in an SQL query.
> They were fixed strings (no variables), so they don't really need
> escaping, but I was under the impression that it is good practice to
> add back quotes to every field/table/database name in a SQL query, not
> only the dynamic ones?

It is usually good practice to avoid problems in case future MySQL
versions will introduce new keywords.

	Michal Čihař | http://cihar.com | http://phpmyadmin.cz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20110816/29a75b5f/attachment.sig>

More information about the Developers mailing list