reference/mysqli/mysqli/info.xml
015aa90a1c72fbf17257d4094a696a326d2da1d7
...
...
@@ -2,22 +2,19 @@
2
2
<!-- $Revision$ -->
3
3
<refentry xml:id="mysqli.info" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
-
<refname>mysqli->info</refname>
5
+
<refname>mysqli::$info</refname>
6
6
<refname>mysqli_info</refname>
7
7
<refpurpose>Retrieves information about the most recently executed query</refpurpose>
8
8
</refnamediv>
9
9

10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
-
<para>Object oriented style (property)</para>
13
-
<classsynopsis>
14
-
<ooclass><classname>mysqli</classname></ooclass>
15
-
<fieldsynopsis><type>string</type><varname>info</varname></fieldsynopsis>
16
-
</classsynopsis>
17
-
<para>Procedural style:</para>
12
+
<para>&style.oop;</para>
13
+
<fieldsynopsis><type class="union"><type>string</type><type>null</type></type><varname linkend="mysqli.info">mysqli-&gt;info</varname></fieldsynopsis>
14
+
<para>&style.procedural;</para>
18
15
<methodsynopsis>
19
-
<type>string</type><methodname>mysqli_info</methodname>
20
-
<methodparam><type>mysqli</type><parameter>link</parameter></methodparam>
16
+
<type class="union"><type>string</type><type>null</type></type><methodname>mysqli_info</methodname>
17
+
<methodparam><type>mysqli</type><parameter>mysql</parameter></methodparam>
21
18
</methodsynopsis>
22
19
<para>
23
20
The <function>mysqli_info</function> function returns a string providing
...
...
@@ -25,9 +22,9 @@
25
22
provided below:
26
23
</para>
27
24
<para>
28
-
<table>
25
+
<table xml:id="mysqli.info.description">
29
26
<title>Possible mysqli_info return values</title>
30
-
<tgroup cols='2'>
27
+
<tgroup cols="2">
31
28
<thead>
32
29
<row>
33
30
<entry>Query type</entry>
...
...
@@ -61,7 +58,7 @@
61
58
</para>
62
59
<note>
63
60
<para>
64
-
Queries which do not fall into one of the above formats are not supported.
61
+
Queries which do not fall into one of the preceding formats are not supported.
65
62
In these situations, <function>mysqli_info</function> will return an empty string.
66
63
</para>
67
64
</note>
...
...
@@ -86,61 +83,44 @@
86
83
<refsect1 role="examples">
87
84
&reftitle.examples;
88
85
<example>
89
-
<title>Object oriented style</title>
86
+
<title><varname>$mysqli-&gt;info</varname> example</title>
87
+
<para>&style.oop;</para>
90
88
<programlisting role="php">
91
89
<![CDATA[
92
90
<?php
93
-
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
94
91

95
-
/* check connection */
96
-
if (mysqli_connect_errno()) {
97
-
printf("Connect failed: %s\n", mysqli_connect_error());
98
-
exit();
99
-
}
92
+
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
93
+
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
100
94

101
95
$mysqli->query("CREATE TEMPORARY TABLE t1 LIKE City");
102
96

103
-
/* INSERT INTO .. SELECT */
97
+
/* INSERT INTO ... SELECT */
104
98
$mysqli->query("INSERT INTO t1 SELECT * FROM City ORDER BY ID LIMIT 150");
105
99
printf("%s\n", $mysqli->info);
106
-

107
-
/* close connection */
108
-
$mysqli->close();
109
-
?>
110
100
]]>
111
-
</programlisting>
112
-
</example>
113
-
<example>
114
-
<title>Procedural style</title>
101
+
</programlisting>
102
+
<para>&style.procedural;</para>
115
103
<programlisting role="php">
116
104
<![CDATA[
117
105
<?php
118
-
$link = mysqli_connect("localhost", "my_user", "my_password", "world");
119
106

120
-
/* check connection */
121
-
if (mysqli_connect_errno()) {
122
-
printf("Connect failed: %s\n", mysqli_connect_error());
123
-
exit();
124
-
}
107
+
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
108
+
$link = mysqli_connect("localhost", "my_user", "my_password", "world");
125
109

126
110
mysqli_query($link, "CREATE TEMPORARY TABLE t1 LIKE City");
127
111

128
-
/* INSERT INTO .. SELECT */
112
+
/* INSERT INTO ... SELECT */
129
113
mysqli_query($link, "INSERT INTO t1 SELECT * FROM City ORDER BY ID LIMIT 150");
130
114
printf("%s\n", mysqli_info($link));
131
-

132
-
/* close connection */
133
-
mysqli_close($link);
134
-
?>
135
115
]]>
136
116
</programlisting>
137
-
</example>
138
-
&example.outputs;
139
-
<screen>
117
+
&examples.outputs;
118
+
<screen>
140
119
<![CDATA[
141
120
Records: 150 Duplicates: 0 Warnings: 0
142
121
]]>
143
-
</screen>
122
+
</screen>
123
+
</example>
144
124
</refsect1>
145
125

146
126
<refsect1 role="seealso">
...
...
@@ -155,7 +135,6 @@ Records: 150 Duplicates: 0 Warnings: 0
155
135
</refsect1>
156
136

157
137
</refentry>
158
-

159
138
<!-- Keep this comment at the end of the file
160
139
Local variables:
161
140
mode: sgml
162
141