Thread: Empty a DB?
View Single Post
Old 03-02-2008, 09:25 PM   #6 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Default

How many tables do you have? You could just use DROP TABLE (MySQL :: MySQL 5.1 Reference Manual :: 12.1.16 DROP TABLE Syntax) on each one.

PHP Code:
mysql_query("DROP TABLE foo");
mysql_query("DROP TABLE bar");
// ... 
Might take a while if you have thousands of tables though

Alan
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote
The Following User Says Thank You to Alan @ CIT For This Useful Post:
obolus (03-02-2008)