MySQL - Explain how to close MySQL connection objects

Explain how to close MySQL connection objects.

- MySQL connection objects created with mysql_connect() calls can be closed by calling mysql_close($con) function.

- This reduces the consumption of connection resources on your MySQL server.

- The mysql_close() closes the non-persistent connection to the MySQL server that's associated with the specified link identifier.

- If link_identifier isn't specified, the last opened link is used.

- Open non-persistent MySQL connections and result sets are automatically destroyed when a PHP script finishes its execution.

- So, while explicitly closing open connections and freeing result sets is optional, doing so is recommended.

- This will immediately return resources to PHP and MySQL, which can improve performance.
MySQL - Explain how to handle MySQL statement execution errors
Explain how to handle MySQL statement execution errors - When a MySQL statement is executed using mysql_query(), a FALSE Boolean value is returned if any error occurred......
MySQL - What are storage engines? Explain storage engines supported
What are storage engines? Explain storage engines supported - Storage engines are used to manage the database of the MySQL.......
MySQL - Explain how to create a new table using MyISAM storage engine
Explain how to create a new table using MyISAM storage engine - MyISAM Is based on Indexed Sequential Access Method is the default storage engine......
Post your comment