I don't want to empty all of the existing tables, I want to get rid of every existing table in the database.
Most of the time when forum posts request info on "how to do this with a database", they're referring to the table, not the actual database. I naturally assumed you wanted to empty the table, not DROP all tables from the database.
You can use the command line tool 'mysqladmin' to drop all tables in a comma delimited list, I believe. If you could create a system exec() statement that called this function with those parameters it might be easier to do that several calls to mysql_query() to drop the table(s) (depending on how many you have).
The other way to look at it, if you have the privilege to do so, just make one call to
DROP DATABASE databasename;
I reject your reality, and substitute my own.
The Following User Says Thank You to SOCK For This Useful Post: