reference/mysqli/mysqli/change-user.xml
63b99082ef83eade08151f8cb528246fded81db9
...
...
@@ -9,20 +9,20 @@
9
9

10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
-
<para>Object oriented style (method):</para>
13
-
<methodsynopsis>
14
-
<type>bool</type><methodname>mysqli::change_user</methodname>
15
-
<methodparam><type>string</type><parameter>user</parameter></methodparam>
16
-
<methodparam><type>string</type><parameter>password</parameter></methodparam>
17
-
<methodparam><type>string</type><parameter>database</parameter></methodparam>
18
-
</methodsynopsis>
19
-
<para>Procedural style:</para>
12
+
<para>&style.oop;</para>
13
+
<methodsynopsis role="mysqli">
14
+
<modifier>public</modifier> <type>bool</type><methodname>mysqli::change_user</methodname>
15
+
<methodparam><type>string</type><parameter>username</parameter></methodparam>
16
+
<methodparam><type>string</type><parameter>password</parameter></methodparam>
17
+
<methodparam><type class="union"><type>string</type><type>null</type></type><parameter>database</parameter></methodparam>
18
+
</methodsynopsis>
19
+
<para>&style.procedural;</para>
20
20
<methodsynopsis>
21
21
<type>bool</type><methodname>mysqli_change_user</methodname>
22
-
<methodparam><type>mysqli</type><parameter>link</parameter></methodparam>
23
-
<methodparam><type>string</type><parameter>user</parameter></methodparam>
22
+
<methodparam><type>mysqli</type><parameter>mysql</parameter></methodparam>
23
+
<methodparam><type>string</type><parameter>username</parameter></methodparam>
24
24
<methodparam><type>string</type><parameter>password</parameter></methodparam>
25
-
<methodparam><type>string</type><parameter>database</parameter></methodparam>
25
+
<methodparam><type class="union"><type>string</type><type>null</type></type><parameter>database</parameter></methodparam>
26
26
</methodsynopsis>
27
27
<para>
28
28
Changes the user of the specified database connection and sets the current
...
...
@@ -42,7 +42,7 @@
42
42
<variablelist>
43
43
&mysqli.link.description;
44
44
<varlistentry>
45
-
<term><parameter>user</parameter></term>
45
+
<term><parameter>username</parameter></term>
46
46
<listitem>
47
47
<para>
48
48
The MySQL user name.
...
...
@@ -81,24 +81,17 @@
81
81
</para>
82
82
</refsect1>
83
83

84
-
<refsect1 role="notes">
85
-
&reftitle.notes;
86
-
<note>
87
-
<para>
88
-
Using this command will always cause the current database connection to
89
-
behave as if was a completely new database connection, regardless of if
90
-
the operation was completed successfully. This reset includes performing
91
-
a rollback on any active transactions, closing all temporary tables, and
92
-
unlocking all locked tables.
93
-
</para>
94
-
</note>
84
+
<refsect1 role="errors">
85
+
&reftitle.errors;
86
+
&mysqli.conditionalexception;
95
87
</refsect1>
96
88

97
89
<refsect1 role="examples">
98
90
&reftitle.examples;
99
-
<example>
100
-
<title>Object oriented style</title>
101
-
<programlisting role="php">
91
+
<example>
92
+
<title><methodname>mysqli::change_user</methodname> example</title>
93
+
<para>&style.oop;</para>
94
+
<programlisting role="php">
102
95
<![CDATA[
103
96
<?php
104
97

...
...
@@ -135,11 +128,9 @@ if ($result = $mysqli->query("SELECT @a")) {
135
128
$mysqli->close();
136
129
?>
137
130
]]>
138
-
</programlisting>
139
-
</example>
140
-
<example>
141
-
<title>Procedural style</title>
142
-
<programlisting role="php">
131
+
</programlisting>
132
+
<para>&style.procedural;</para>
133
+
<programlisting role="php">
143
134
<![CDATA[
144
135
<?php
145
136
/* connect database test */
...
...
@@ -176,14 +167,27 @@ mysqli_close($link);
176
167
?>
177
168
]]>
178
169
</programlisting>
179
-
</example>
180
-
&example.outputs;
181
-
<screen>
170
+
&examples.outputs;
171
+
<screen>
182
172
<![CDATA[
183
173
Default database: world
184
174
Value of variable a is NULL
185
175
]]>
186
-
</screen>
176
+
</screen>
177
+
</example>
178
+
</refsect1>
179
+

180
+
<refsect1 role="notes">
181
+
&reftitle.notes;
182
+
<note>
183
+
<para>
184
+
Using this command will always cause the current database connection to
185
+
behave as if was a completely new database connection, regardless of if
186
+
the operation was completed successfully. This reset includes performing
187
+
a rollback on any active transactions, closing all temporary tables, and
188
+
unlocking all locked tables.
189
+
</para>
190
+
</note>
187
191
</refsect1>
188
192

189
193
<refsect1 role="seealso">
...
...
@@ -197,7 +201,6 @@ Value of variable a is NULL
197
201
</refsect1>
198
202

199
203
</refentry>
200
-

201
204
<!-- Keep this comment at the end of the file
202
205
Local variables:
203
206
mode: sgml
204
207