reference/pdo/pdostatement/debugdumpparams.xml
661e6858acade9f5a08fc8f9c07b605f42f4a700
...
...
@@ -1,4 +1,4 @@
1
-
<?xml version="1.0" encoding="UTF-8"?>
1
+
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
3
<refentry xml:id="pdostatement.debugdumpparams" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
...
...
@@ -9,42 +9,74 @@
9
9
</refnamediv>
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
-
<methodsynopsis>
13
-
<type>bool</type><methodname>PDOStatement::debugDumpParams</methodname>
14
-
<void />
12
+
<methodsynopsis role="PDOStatement">
13
+
<modifier>public</modifier> <type class="union"><type>bool</type><type>null</type></type><methodname>PDOStatement::debugDumpParams</methodname>
14
+
<void/>
15
15
</methodsynopsis>
16
16
<para>
17
-
Dumps the informations contained by a prepared statement directly on the
17
+
Dumps the information contained by a prepared statement directly on the
18
18
output. It will provide the <literal>SQL</literal> query in use, the
19
19
number of parameters used (<literal>Params</literal>), the list
20
-
of parameters, with their name, type (<literal>paramtype</literal>) as
21
-
an integer, their key name or position, the value, and the position
20
+
of parameters with their key name or position, their name, their position
22
21
in the query (if this is supported by the PDO driver, otherwise, it will
23
-
be -1).
22
+
be -1), type (<literal>param_type</literal>) as an integer, and a boolean
23
+
value <literal>is_param</literal>.
24
24
</para>
25
25
<para>
26
-
This is a debug function, which dump directly the data on the normal
26
+
This is a debug function, which dumps the data directly to the normal
27
27
output.
28
28
&tip.ob-capture;
29
29
</para>
30
30
<para>
31
-
This will only dumps the parameters in the statement at the moment
31
+
This will only dump the parameters in the statement at the moment
32
32
of the dump. Extra parameters are not stored in the statement,
33
33
and not displayed.
34
34
</para>
35
35
</refsect1>
36
36

37
+
<refsect1 role="parameters">
38
+
&reftitle.parameters;
39
+
&no.function.parameters;
40
+
</refsect1>
41
+

37
42
<refsect1 role="returnvalues">
38
43
&reftitle.returnvalues;
39
44
<para>
40
-
&return.void;
45
+
Returns &null;, or &false; in case of an error.
46
+
</para>
47
+
</refsect1>
48
+

49
+
<refsect1 role="changelog">
50
+
&reftitle.changelog;
51
+
<para>
52
+
<informaltable>
53
+
<tgroup cols="2">
54
+
<thead>
55
+
<row>
56
+
<entry>&Version;</entry>
57
+
<entry>&Description;</entry>
58
+
</row>
59
+
</thead>
60
+
<tbody>
61
+
<row>
62
+
<entry>7.2.0</entry>
63
+
<entry>
64
+
<methodname>PDOStatement::debugDumpParams</methodname> now returns the SQL sent to
65
+
the database, including the full, raw query (including the replaced placeholders with
66
+
their bounded values). Note, that this will only be available if emulated prepared
67
+
statements are turned on.
68
+
</entry>
69
+
</row>
70
+
</tbody>
71
+
</tgroup>
72
+
</informaltable>
41
73
</para>
42
74
</refsect1>
43
75

44
76
<refsect1 role="examples">
45
77
&reftitle.examples;
46
78
<example>
47
-
<title><function>PDOStatement::debugDumpParams</function> example with named parameters</title>
79
+
<title><methodname>PDOStatement::debugDumpParams</methodname> example with named parameters</title>
48
80
<programlisting role="php">
49
81
<![CDATA[
50
82
<?php
...
...
@@ -85,7 +117,7 @@ param_type=2
85
117
</example>
86
118

87
119
<example>
88
-
<title><function>PDOStatement::debugDumpParams</function> example with unnamed parameters</title>
120
+
<title><methodname>PDOStatement::debugDumpParams</methodname> example with unnamed parameters</title>
89
121
<programlisting role="php">
90
122
<![CDATA[
91
123
<?php
...
...
@@ -128,22 +160,20 @@ param_type=2
128
160
]]>
129
161
</screen>
130
162
</example>
131
-

132
163
</refsect1>
133
164

134
165
<refsect1 role="seealso">
135
166
&reftitle.seealso;
136
167
<para>
137
168
<simplelist>
138
-
<member><function>PDO::prepare</function></member>
139
-
<member><function>PDOStatement::bindParam</function></member>
140
-
<member><function>PDOStatement::bindValue</function></member>
169
+
<member><methodname>PDO::prepare</methodname></member>
170
+
<member><methodname>PDOStatement::bindParam</methodname></member>
171
+
<member><methodname>PDOStatement::bindValue</methodname></member>
141
172
</simplelist>
142
173
</para>
143
174
</refsect1>
144
175

145
176
</refentry>
146
-

147
177
<!-- Keep this comment at the end of the file
148
178
Local variables:
149
179
mode: sgml
150
180