reference/pdo/pdo/quote.xml
661e6858acade9f5a08fc8f9c07b605f42f4a700
...
...
@@ -9,22 +9,22 @@
9
9
</refnamediv>
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
-
<methodsynopsis>
13
-
<modifier>public</modifier> <type>string</type><methodname>PDO::quote</methodname>
12
+
<methodsynopsis role="PDO">
13
+
<modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>PDO::quote</methodname>
14
14
<methodparam><type>string</type><parameter>string</parameter></methodparam>
15
-
<methodparam choice="opt"><type>int</type><parameter>parameter_type</parameter><initializer>PDO::PARAM_STR</initializer></methodparam>
15
+
<methodparam choice="opt"><type>int</type><parameter>type</parameter><initializer>PDO::PARAM_STR</initializer></methodparam>
16
16
</methodsynopsis>
17
17

18
18
<para>
19
-
<function>PDO::quote</function> places quotes around the input string (if
19
+
<methodname>PDO::quote</methodname> places quotes around the input string (if
20
20
required) and escapes special characters within the input string, using a
21
21
quoting style appropriate to the underlying driver.
22
22
</para>
23
23
<para>
24
24
If you are using this function to build SQL statements, you are
25
25
<emphasis>strongly</emphasis> recommended to use
26
-
<function>PDO::prepare</function> to prepare SQL statements with bound
27
-
parameters instead of using <function>PDO::quote</function> to interpolate
26
+
<methodname>PDO::prepare</methodname> to prepare SQL statements with bound
27
+
parameters instead of using <methodname>PDO::quote</methodname> to interpolate
28
28
user input into an SQL statement. Prepared statements with bound parameters
29
29
are not only more portable, more convenient, immune to SQL injection, but
30
30
are often much faster to execute than interpolated queries, as both the
...
...
@@ -57,10 +57,12 @@
57
57
</listitem>
58
58
</varlistentry>
59
59
<varlistentry>
60
-
<term><parameter>parameter_type</parameter></term>
60
+
<term><parameter>type</parameter></term>
61
61
<listitem>
62
62
<para>
63
-
Provides a data type hint for drivers that have alternate quoting styles.
63
+
Provides a hint to the type of data for drivers that have alternate quoting
64
+
styles. For example <constant>PDO_PARAM_LOB</constant> will tell the driver to
65
+
escape binary data.
64
66
</para>
65
67
</listitem>
66
68
</varlistentry>
...
...
@@ -161,14 +163,13 @@ Quoted string: 'Co''mpl''''ex "st''"ring'
161
163
&reftitle.seealso;
162
164
<para>
163
165
<simplelist>
164
-
<member><function>PDO::prepare</function></member>
165
-
<member><function>PDOStatement::execute</function></member>
166
+
<member><methodname>PDO::prepare</methodname></member>
167
+
<member><methodname>PDOStatement::execute</methodname></member>
166
168
</simplelist>
167
169
</para>
168
170
</refsect1>
169
171

170
172
</refentry>
171
-

172
173
<!-- Keep this comment at the end of the file
173
174
Local variables:
174
175
mode: sgml
175
176