mysql_drop_db

bool mysql_drop_db(string database_name, [mysql link connection]) 
database_name Name of the database to drop
connection Connection handle returned by mysql_connect() or mysql_pconnect()

Drops (deletes) a MySQL database.

Returns:

TRUE on success; FALSE on failure

Description:

mysql_drop_db() drops/deletes a MySQL database. Every table in the database is permanently removed. Databases can also be dropped by using a SQL query such as DROP DATABASE ...

Warning:

Dropping a database is irreversible. The only way to recover the database is by restoring from backups!

Version:

PHP 3+, PHP 4+

See also:

To delete rows from a table:

Use mysql_query() with a DELETE query. See the MySQL documentation for more information.

Example:

Delete ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.