reference/mysqli/mysqli/get-server-info.xml
1a7e56aa81712964a7f1984617e9fbcd0b33dcb5
...
...
@@ -11,15 +11,15 @@
11
11
<refsect1 role="description">
12
12
&reftitle.description;
13
13
<para>&style.oop;</para>
14
-
<fieldsynopsis><type>string</type><varname linkend="mysqli.get-server-info">mysqli->server_info</varname></fieldsynopsis>
15
-
<methodsynopsis role="oop">
16
-
<type>string</type><methodname>mysqli_stmt::get_server_info</methodname>
14
+
<fieldsynopsis><type>string</type><varname linkend="mysqli.get-server-info">mysqli-&gt;server_info</varname></fieldsynopsis>
15
+
<methodsynopsis role="mysqli">
16
+
<modifier>public</modifier> <type>string</type><methodname>mysqli::get_server_info</methodname>
17
17
<void/>
18
18
</methodsynopsis>
19
19
<para>&style.procedural;</para>
20
20
<methodsynopsis>
21
21
<type>string</type><methodname>mysqli_get_server_info</methodname>
22
-
<methodparam><type>mysqli</type><parameter>link</parameter></methodparam>
22
+
<methodparam><type>mysqli</type><parameter>mysql</parameter></methodparam>
23
23
</methodsynopsis>
24
24
<para>
25
25
Returns a string representing the version of the MySQL server that the
...
...
@@ -46,51 +46,35 @@
46
46
<refsect1 role="examples">
47
47
&reftitle.examples;
48
48
<example>
49
-
<title><varname>$mysqli->server_info</varname> example</title>
49
+
<title><varname>$mysqli-&gt;server_info</varname> example</title>
50
50
<para>&style.oop;</para>
51
51
<programlisting role="php">
52
52
<![CDATA[
53
53
<?php
54
-
$mysqli = new mysqli("localhost", "my_user", "my_password");
55
54

56
-
/* check connection */
57
-
if (mysqli_connect_errno()) {
58
-
printf("Connect failed: %s\n", mysqli_connect_error());
59
-
exit();
60
-
}
55
+
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
56
+
$mysqli = new mysqli("localhost", "my_user", "my_password");
61
57

62
58
/* print server version */
63
59
printf("Server version: %s\n", $mysqli->server_info);
64
-

65
-
/* close connection */
66
-
$mysqli->close();
67
-
?>
68
60
]]>
69
61
</programlisting>
70
62
<para>&style.procedural;</para>
71
63
<programlisting role="php">
72
64
<![CDATA[
73
65
<?php
74
-
$link = mysqli_connect("localhost", "my_user", "my_password");
75
66

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

82
70
/* print server version */
83
71
printf("Server version: %s\n", mysqli_get_server_info($link));
84
-

85
-
/* close connection */
86
-
mysqli_close($link);
87
-
?>
88
72
]]>
89
73
</programlisting>
90
-
&examples.outputs;
74
+
&examples.outputs.similar;
91
75
<screen>
92
76
<![CDATA[
93
-
Server version: 4.1.2-alpha-debug
77
+
Server version: 8.0.21
94
78
]]>
95
79
</screen>
96
80
</example>
...
...
@@ -108,7 +92,6 @@ Server version: 4.1.2-alpha-debug
108
92
</refsect1>
109
93

110
94
</refentry>
111
-

112
95
<!-- Keep this comment at the end of the file
113
96
Local variables:
114
97
mode: sgml
115
98