adding table name protection

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@280936 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Damien Seguy 2009-05-22 10:12:12 +00:00
parent 22c4de3618
commit 417e015ab2

View file

@ -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>