
- 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 delete an existing database?
PHP uses a mysql_query function to delete a MySQL database. This function takes two parameters and returns TRUE on success or FALSE on failure. Its syntax is as follows −
Syntax
bool mysql_query( sql, connection );
Followings are the parameters used in this function −
Sr. No. | Parameter & Description |
1 | Required SQL query to delete a MySQL database |
2 | Optional if not specified, then the last opened connection by mysql_connect will be used. |
- Related Articles
- Which PHP function is used to delete an existing MySQL table?
- Which PHP function is used to insert data into an existing MySQL table?
- Which PHP function is used to create a new database?
- Which PHP function is used to select a MySQL database?
- Which PHP function is used to establish MySQL database connection using PHP script?
- Which PHP function is used to disconnect from MySQL database connection?
- Which PHP functions are used in the PHP script to fetch data from an existing MySQL table?
- How to write PHP script to delete data from an existing MySQL table?
- Which PHP function is used to create a MySQL table?
- How to call an existing function in a database using JDBC API?
- How to delete a column from an existing table in a database using JDBC API?
- How can we delete an existing MySQL table by using PHP script?
- delete() function in PHP
- Which PHP function is used to release cursor memory associated with MySQL result?
- PHP program to delete an element from the array using the unset function

Advertisements