Oracle 5.0 Reference Manual page 2265

Table of Contents

Advertisement

Return Values
Returns the default character set name for the current connection.
Examples
Example 20.25.
<?php
$link
= mysql_connect('localhost', 'mysql_user', 'mysql_password');
$charset = mysql_client_encoding($link);
echo "The current character set is: $charset\n";
?>
The above example will output something similar to:
The current character set is: latin1
See Also
mysql_set_charset
mysql_real_escape_string
20.7.2.5.3.
mysql_close
Copyright 1997-2012 the PHP Documentation Group. [2230]
mysql_close
Close MySQL connection
Description
bool mysql_close(
resource link_identifier
=
=NULL);
mysql_close
specified link identifier. If
Using
mysql_close
the end of the script's execution. See also
Parameters
Original MySQL API (Mysql)
is found, it will try to create one as if
with no arguments. If no connection is found or established, an
E_WARNING
mysql_client_encoding
Warning
This extension is deprecated as of PHP 5.5.0, and will be removed in the
future. Instead, the
also
MySQL: choosing an API
Alternatives to this function include:
mysqli_close
PDO: Assign the value of
closes the non-persistent connection to the MySQL server that's associated with the
link_identifier
isn't usually necessary, as non-persistent open links are automatically closed at
level error is generated.
example
MySQLi
or
PDO_MySQL
guide and
related FAQ
to the PDO object
NULL
isn't specified, the last opened link is used.
freeing
resources.
2245
mysql_connect
extension should be used. See
for more information.
was called

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents