How would I use a PHP file to clear a Database of ALL tables?

PHP Code:mysql_select_db("db_name", $mysqlconnectionvar);
mysql_query("DROP TABLE `table_name`;");
I think the query:
would suffice but im not sure..Code:DELETE FROM tablename
As Toms deletes the table and you seem to want it just to be cleared "/
Last edited by Splinter; 01-05-2006 at 07:54 AM.
then use:
mysql_query("DROP TABLE `table_name`;");
for each table =]
To delete everything from the table, but not the actuall table:
To delete the table and the data it contains:Code:TRUNCATE TABLE 'tableName'
Code:DROP TABLE 'tableName'
Last edited by nets; 01-05-2006 at 09:59 AM.
kinda quit.
Want to hide these adverts? Register an account for free!