mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-22 20:08:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@126884 c90b9560-bf6c-de11-be94-00142212c4b1
65 lines
2.6 KiB
XML
65 lines
2.6 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.2 $ -->
|
|
<refentry id="function.mysqli-change-user">
|
|
<refnamediv>
|
|
<refname>mysqli_change_user</refname>
|
|
<refpurpose>Changes the user of the specified database connection</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>mysqli_change_user</methodname>
|
|
<methodparam><type>resource</type><parameter>link</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>user</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>password</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>database</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>mysqli_change_user</function> is used to change the user of the specified
|
|
database connection as given by the <parameter>link</parameter> parameter and sets the
|
|
current database to that specified by the <parameter>database</parameter> parameter.
|
|
This function will return a boolean value indicating if the operation was successful
|
|
or not.
|
|
</para>
|
|
<para>
|
|
If desired, the NULL value may be passed in place of the <parameter>database</parameter>
|
|
parameter resulting in only changing the user and not selecting a database. To select
|
|
a database in this case use the <function>mysqli_select_db</function> function.
|
|
</para>
|
|
<para>
|
|
In order to successfully change users a valid <parameter>username</parameter> and
|
|
<parameter>password</parameter> parameters must be provided and that user must have
|
|
sufficient permissions to access the desired database. If for any reason authorization
|
|
fails, the current user authentication will remain.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Using this command will always cause the current database connection to behave as if
|
|
was a completely new database connection, regardless of if the operation was completed
|
|
successfully. This reset includes performing a rollback on any active transactions,
|
|
closing all temporary tables, and unlocking all locked tables.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|