In PHP, we can use the mysql_query
The syntax above shows that $query is the SQL query string to be executed, and $link_identifier is the database connection identifier. If not provided, the function uses the last opened connection by default.
Below is an explanation of the two parameters for the mysql_query function:
No. | Parameter Explanation |
---|---|
1 | Required: The SQL query string to delete the MySQL database. |
2 | Optional: The database connection identifier. If not specified, the last successful connection will be used. |
By using the mysql_query function, you can easily delete a specified MySQL database. However, please note that this operation is irreversible, so be cautious when using it.