mysql_close
mysql_close
Close MySQL connection
Waarschuwing: >
mysqli_close
bool **mysql_close** resource $link_identifier
closes the non-persistent connection to
the MySQL server that's associated with the specified link identifier. If
isn't specified, the last opened
link is used.
mysql_close``link_identifier
return.success
Voorbeeld: example
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
Connected successfully
Opmerking: > will not close persistent links created by . For additional details, see the manual page on .
mysql_close``mysql_pconnectpersistent connections
mysql_connect``mysql_free_result