Closing the Connection

The final step of any database application is to free the database resources it uses. In MySQL, you free your database resources through the mysql_close( ) function:

mysql_close(connection);

If you attempt to use that connection at any point after closing it, you will encounter an error.

Get Managing & Using MySQL, 2nd Edition 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.