Name
mysql_close( )
Synopsis
mysql_close([connection
])
This closes the current or last MySQL
connection, or a given connection. The function returns true if
it’s successful; false if unsuccessful. This
function will not close persistent connections started with
mysql_pconnect( )
.
... $connection = mysql_connect('localhost', 'russell', 'dyer'); mysql_select_db('workrequests', $connection); ... mysql_close($connection); ...
If a script has opened only one connection to MySQL, it’s not necessary to specify the connection link to close as shown here.
Get MySQL in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.