Added wrapper function for mysql_close

This commit is contained in:
Dmitry Simushev 2011-11-08 17:29:33 +00:00 committed by Dmitriy Simushev
parent b54cd674e6
commit 6698601d19

View File

@ -363,6 +363,14 @@ function connect()
return $link; return $link;
} }
function close_connection($link)
{
global $use_persistent_connection;
if (! $use_persistent_connection) {
mysql_close($link);
}
}
function perform_query($query, $link) function perform_query($query, $link)
{ {
mysql_query($query, $link) or die(' Query failed: ' . mysql_error($link)); mysql_query($query, $link) or die(' Query failed: ' . mysql_error($link));