reference/mysqli/mysqli/info.xml
015aa90a1c72fbf17257d4094a696a326d2da1d7
...
...
@@ -10,11 +10,11 @@
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
12
<para>&style.oop;</para>
13
-
<fieldsynopsis><type>string</type><varname linkend="mysqli.info">mysqli->info</varname></fieldsynopsis>
13
+
<fieldsynopsis><type class="union"><type>string</type><type>null</type></type><varname linkend="mysqli.info">mysqli-&gt;info</varname></fieldsynopsis>
14
14
<para>&style.procedural;</para>
15
15
<methodsynopsis>
16
-
<type>string</type><methodname>mysqli_info</methodname>
17
-
<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>
18
18
</methodsynopsis>
19
19
<para>
20
20
The <function>mysqli_info</function> function returns a string providing
...
...
@@ -22,7 +22,7 @@
22
22
provided below:
23
23
</para>
24
24
<para>
25
-
<table>
25
+
<table xml:id="mysqli.info.description">
26
26
<title>Possible mysqli_info return values</title>
27
27
<tgroup cols="2">
28
28
<thead>
...
...
@@ -83,51 +83,35 @@
83
83
<refsect1 role="examples">
84
84
&reftitle.examples;
85
85
<example>
86
-
<title><varname>$mysqli->info</varname> example</title>
86
+
<title><varname>$mysqli-&gt;info</varname> example</title>
87
87
<para>&style.oop;</para>
88
88
<programlisting role="php">
89
89
<![CDATA[
90
90
<?php
91
-
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
92
91

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

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

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

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

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

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

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

128
-
/* close connection */
129
-
mysqli_close($link);
130
-
?>
131
115
]]>
132
116
</programlisting>
133
117
&examples.outputs;
...
...
@@ -151,7 +135,6 @@ Records: 150 Duplicates: 0 Warnings: 0
151
135
</refsect1>
152
136

153
137
</refentry>
154
-

155
138
<!-- Keep this comment at the end of the file
156
139
Local variables:
157
140
mode: sgml
158
141