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: 2008/04/18 14:00 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki