> Online tutorial : Closing a Connection in mysql
Showing posts with label Closing a Connection in mysql. Show all posts
Showing posts with label Closing a Connection in mysql. Show all posts

Closing a Connection in mysql

Closing a Connection
The connection will be closed as soon as the script ends. To close the connection before, use the mysql_close() function.

?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
// some code
mysql_close($con);
?>