September 2001
Intermediate to advanced
768 pages
32h 45m
English
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:
Read now
Unlock full access