reference/mysqli/mysqli/stat.xml
9e0a92ed2a61bb16fb7179fbbc43a4404a9a4598
...
...
@@ -10,14 +10,14 @@
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
12
<para>&style.oop;</para>
13
-
<methodsynopsis role="oop">
14
-
<type>string</type><methodname>mysqli::stat</methodname>
15
-
<void />
13
+
<methodsynopsis role="mysqli">
14
+
<modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>mysqli::stat</methodname>
15
+
<void/>
16
16
</methodsynopsis>
17
17
<para>&style.procedural;</para>
18
18
<methodsynopsis>
19
-
<type>string</type><methodname>mysqli_stat</methodname>
20
-
<methodparam><type>mysqli</type><parameter>link</parameter></methodparam>
19
+
<type class="union"><type>string</type><type>false</type></type><methodname>mysqli_stat</methodname>
20
+
<methodparam><type>mysqli</type><parameter>mysql</parameter></methodparam>
21
21
</methodsynopsis>
22
22
<para>
23
23
<function>mysqli_stat</function> returns a string containing
...
...
@@ -51,36 +51,22 @@
51
51
<programlisting role="php">
52
52
<![CDATA[
53
53
<?php
54
-
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
55
-

56
-
/* check connection */
57
-
if (mysqli_connect_errno()) {
58
-
printf("Connect failed: %s\n", mysqli_connect_error());
59
-
exit();
60
-
}
61
54

62
-
printf ("System status: %s\n", $mysqli->stat());
55
+
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
56
+
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
63
57

64
-
$mysqli->close();
65
-
?>
58
+
printf("System status: %s\n", $mysqli->stat());
66
59
]]>
67
60
</programlisting>
68
61
<para>&style.procedural;</para>
69
62
<programlisting role="php">
70
63
<![CDATA[
71
64
<?php
72
-
$link = mysqli_connect("localhost", "my_user", "my_password", "world");
73
65

74
-
/* check connection */
75
-
if (mysqli_connect_errno()) {
76
-
printf("Connect failed: %s\n", mysqli_connect_error());
77
-
exit();
78
-
}
66
+
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
67
+
$link = mysqli_connect("localhost", "my_user", "my_password", "world");
79
68

80
69
printf("System status: %s\n", mysqli_stat($link));
81
-

82
-
mysqli_close($link);
83
-
?>
84
70
]]>
85
71
</programlisting>
86
72
&examples.outputs;
...
...
@@ -104,7 +90,6 @@ Memory in use: 8496K Max memory used: 8560K
104
90
</refsect1>
105
91

106
92
</refentry>
107
-

108
93
<!-- Keep this comment at the end of the file
109
94
Local variables:
110
95
mode: sgml
111
96