The following is a script to delete a table prefixed with "prefix:
Copy codeThe Code is as follows:
<? Php
// Set the database connection information. Database server address, database user name, data Password
Mysql_connect ('database host', 'database username', 'database password ');
// Set the name of the queried Database
Mysql_select_db ('database name ');
$ Rs = mysql_query ('show tables ');
While ($ arr = mysql_fetch_array ($ rs ))
{
// Set the database table prefix to be deleted in batches, for example, prefix _
$ TF = strpos ($ arr [0], 'prefix _');
If ($ TF = 0 ){
$ FT = mysql_query ("drop table $ arr [0]");
If ($ FT ){
Echo "$ arr [0] deleted successfully! <Br> ";
}
}
}
?>
Create a new php file and save it as deletedata. php
For example, if you want to delete the back-end data of www.aworldair.com or http://www.pro-reach.com/, You can do this in two steps:
1. Upload the saved deletedata. php file to the root directory of your website;
2. Enter the following in the address bar: Success.