
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
Which PHP function is used to disconnect from MySQL database connection?
PHP provides us mysql_close() function with the help of which we can disconnect from the MySQL database anytime. This function takes a single parameter, which is a connection returned by the mysql_connect() function. Its syntax is as follows −
Syntax
bool mysql_close ( resource $link_identifier );
Here, if a resource is not specified, then the last opened database is closed. This function returns true if it closes the connection successfully otherwise it returns false.
- Related Articles
- Which PHP function is used to establish MySQL database connection using PHP script?
- Which PHP function is used to select a MySQL database?
- Which PHP function is used to create a new database?
- Which PHP function is used to delete an existing database?
- Which PHP function is used to create a MySQL table?
- Which PHP function is used to delete an existing MySQL table?
- Write an example to establish MySQL database connection using PHP script?
- Which PHP function is used to insert data into an existing MySQL table?
- Which PHP function is used to release cursor memory associated with MySQL result?
- Which PHP function is used to give the number of rows affected by MySQL query?
- MySQL BIT_LENGTH() function is used for which purpose?
- Which PHP functions are used in the PHP script to fetch data from an existing MySQL table?
- Which function in MySQL is used to reverse a particular string?
- Which MySQL function is used to find first non-NULL value from a list of values?
- PHP and MYSQL database connection and table creation only once if it does not already exist?

Advertisements