Функции за работа с MySQL
PHP Manual

mysql_change_user

(PHP 3 <= 3.0.13)

mysql_change_userChange logged in user of the active connection

Описание

int mysql_change_user ( string $user , string $password [, string $database [, resource $link_identifier ]] )

mysql_change_user() changes the logged in user of the current active connection, or the connection given by the optional link_identifier parameter. If a database is specified, this will be the current database after the user has been changed. If the new user and password authorization fails, the current connected user stays active.

This function is deprecated and no longer exists in PHP.

Параметри

user

The new MySQL username.

password

The new MySQL password.

database

The MySQL database. If not specified, the current selected database is used.

link_identifier

Връзката към MySQL. Ако не е указана, се използва последната създадена връзка от mysql_connect(). Ако не намери такава връзка, ще направи опит да установи връзка, все едно е изпълнена mysql_connect() без параметри. Ако случайно не е намерена или създадена никаква връзка, ще се генерира предупреждение от ниво E_WARNING.

Връщани стойности

Връща TRUE при успех или FALSE при неуспех.

Бележки

Забележка: Requirements
This function requires MySQL 3.23.3 or higher.

Вж. също


Функции за работа с MySQL
PHP Manual