reference/mysqli/mysqli/errno.xml
614d77598aa2aaa3ddf3e8494812a3b82864d590
...
...
@@ -2,35 +2,24 @@
2
2
<!-- $Revision$ -->
3
3
<refentry xml:id="mysqli.errno" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
-
<refname>mysqli->errno</refname>
5
+
<refname>mysqli::$errno</refname>
6
6
<refname>mysqli_errno</refname>
7
7
<refpurpose>Returns the error code for the most recent function call</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>int</type><varname>errno</varname></fieldsynopsis>
16
-
</classsynopsis>
17
-
<para>Procedural style:</para>
12
+
<para>&style.oop;</para>
13
+
<fieldsynopsis><type>int</type><varname linkend="mysqli.errno">mysqli-&gt;errno</varname></fieldsynopsis>
14
+
<para>&style.procedural;</para>
18
15
<methodsynopsis>
19
16
<type>int</type><methodname>mysqli_errno</methodname>
20
-
<methodparam><type>mysqli</type><parameter>link</parameter></methodparam>
17
+
<methodparam><type>mysqli</type><parameter>mysql</parameter></methodparam>
21
18
</methodsynopsis>
22
19
<para>
23
20
Returns the last error code for the most recent MySQLi function call that
24
21
can succeed or fail.
25
22
</para>
26
-
<para>
27
-
Client error message numbers are listed in the MySQL
28
-
<filename>errmsg.h</filename> header file, server error message numbers
29
-
are listed in <filename>mysqld_error.h</filename>.
30
-
In the MySQL source distribution you can find a complete list of error
31
-
messages and error numbers in the file
32
-
<filename>Docs/mysqld_error.txt</filename>.
33
-
</para>
34
23
</refsect1>
35
24
36
25
<refsect1 role="parameters">
...
...
@@ -53,15 +42,16 @@
53
42
<refsect1 role="examples">
54
43
&reftitle.examples;
55
44
<example>
56
-
<title>Object oriented style</title>
45
+
<title><varname>$mysqli-&gt;errno</varname> example</title>
46
+
<para>&style.oop;</para>
57
47
<programlisting role="php">
58
48
<![CDATA[
59
49
<?php
60
50
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
61
51

62
52
/* check connection */
63
-
if (mysqli_connect_errno()) {
64
-
printf("Connect failed: %s\n", mysqli_connect_error());
53
+
if ($mysqli->connect_errno) {
54
+
printf("Connect failed: %s\n", $mysqli->connect_error);
65
55
exit();
66
56
}
67
57

...
...
@@ -73,10 +63,8 @@ if (!$mysqli->query("SET a=1")) {
73
63
$mysqli->close();
74
64
?>
75
65
]]>
76
-
</programlisting>
77
-
</example>
78
-
<example>
79
-
<title>Procedural style</title>
66
+
</programlisting>
67
+
<para>&style.procedural;</para>
80
68
<programlisting role="php">
81
69
<![CDATA[
82
70
<?php
...
...
@@ -97,13 +85,13 @@ mysqli_close($link);
97
85
?>
98
86
]]>
99
87
</programlisting>
100
-
</example>
101
-
&example.outputs;
102
-
<screen>
88
+
&examples.outputs;
89
+
<screen>
103
90
<![CDATA[
104
91
Errorcode: 1193
105
92
]]>
106
-
</screen>
93
+
</screen>
94
+
</example>
107
95
</refsect1>
108
96

109
97
<refsect1 role="seealso">
...
...
@@ -119,7 +107,6 @@ Errorcode: 1193
119
107
</refsect1>
120
108
121
109
</refentry>
122
-

123
110
<!-- Keep this comment at the end of the file
124
111
Local variables:
125
112
mode: sgml
126
113