Table of Contents

Syntax

boolean mysql_close(resource $res)

(PHP 4, PHP 5)

$res The database connection resource that we want to close.
RETURNS True if the MySQL database connection was closed successfully, false otherwise.

What it Does

Closes the link to a MySQL database connection. You should always call this function when you are done communicating with a database in your script.

Example

// open the mysql resource
$res = mysql_connect($server, $user, $pass);
 
// close the mysql resource
mysql_close($res);
 
mysql_close.txt · Last modified: Apr 18, 2008 - 2:00pm (external edit)
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki