mysql_change_user
(PHP 3>= 3.0.13)
mysql_change_user -- Change logged in user of the active
connection
Description
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. Returns TRUE on success or
FALSE on failure.
Note: This function was introduced in PHP 3.0.13 and requires
MySQL 3.23.3 or higher. It is not available in PHP 4.
mysql_client_encoding
(PHP 4 >= 4.3.0)
mysql_client_encoding -- Returns the name of the character
set
Description
string mysql_client_encoding ( [resource link_identifier])
mysql_client_encoding() returns the default character set
name for the current connection.
Example 1. mysql_client_encoding() example
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
$charset = mysql_client_encoding($link);
printf("current character set is %s\n", $charset);
?>
The above example would produce the following output:
current character set is latin1
See also mysql_real_escape_string()
|