cvs: phpdoc /en/reference/pdo_4d sql4d.xml
| From: | Damien Seguy | Date: | Fri, 22 May 2009 10:12:13 +0000 |
| Subject: | cvs: phpdoc /en/reference/pdo_4d sql4d.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4054@lists.php.net to get a copy of this message | ||
dams Fri May 22 10:12:13 2009 UTC
Modified files:
/phpdoc/en/reference/pdo_4d sql4d.xml
Log:
adding table name protection
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pdo_4d/sql4d.xml?r1=1.5&r2=1.6&diff_format=u
Index: phpdoc/en/reference/pdo_4d/sql4d.xml
diff -u phpdoc/en/reference/pdo_4d/sql4d.xml:1.5 phpdoc/en/reference/pdo_4d/sql4d.xml:1.6
--- phpdoc/en/reference/pdo_4d/sql4d.xml:1.5 Mon May 4 10:34:23 2009
+++ phpdoc/en/reference/pdo_4d/sql4d.xml Fri May 22 10:12:12 2009
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<refentry xml:id="ref.pdo-4d.sql4d" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
@@ -85,6 +85,17 @@
and <literal>_USER_SCHEMAS</literal>.
</entry>
</row>
+ <row>
+ <entry>SQL structure delimiter</entry>
+ <entry>To escape SQL elements (tables, fields, users, groups, schema,
+ primary key, etc.), closing brackets must be doubled, and the whole
+ identifier must be between square brackets.
+ <entry>
+ Use the following function to protect SQL objects, and then,
+ put it between square brackets :
+ <literal>str_replace(']',']]', $table)</literal>.
+ </entry>
+ </row>
</tbody>
</tgroup>
</table>