Name
mysql_drop_db —
Synopsis
int mysql_drop_db(MYSQL *mysql, const char *db)
Destroys the database with the given name. The return value is 0 if the operation was successful and nonzero if there was an error.
Tip
This function has been deprecated in the newer releases of MySQL.
MySQL now supports the DROP DATABASE
SQL
statement. This should be used, via the
mysql_query
function, instead.
Example
/* Destroy the database 'old_database' */ result = mysql_drop_db(&mysql, "old_database");
Get Managing & Using MySQL, 2nd Edition 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.