Collections:
Close MySQL Connection Objects in MySQL
How To Close MySQL Connection Objects in MySQL?
✍: FYIcenter.com
MySQL connection objects created with mysql_connect() calls should be closed as soon as you have finished all of your database access needs by calling mysql_close($con) function. This will reduce the consumption of connection resources on your MySQL server.
If you forget to call mysql_close(), PHP engine will automatically close your connection objects, when your PHP script reaches the end. The following PHP script shows a good example of mysql_close():
<?php
$con = mysql_connect('localhost:8888', 'dev', 'iyf');
if (!$con) {
print("There is a problem with MySQL connection.\n");
} else {
print("The MySQL connection object is ready.\n");
mysql_close($con);
}
?>
⇒ List All Existing Databases in MySQL
⇐ Retrieving MySQL Server information in MySQL
2017-11-11, 2314🔥, 0💬
Popular Posts:
Can You Drop an Index Associated with a Unique or Primary Key Constraint in Oracle? You can not dele...
How To Install Oracle Database 10g XE in Oracle? To install 10g universal edition, double click, Ora...
Where to find answers to frequently asked questions on Conditional Statements and Loops in SQL Serve...
Where to find answers to frequently asked questions on Managing Security, Login and User in SQL Serv...
How To Connect the Oracle Server as SYSDBA in Oracle? This is Step 4. The best way to connect to the...