最新PHP 刪除MySQL全部的表php
如下是三零網爲你們整理的最新PHP 刪除MySQL全部的表的文章,但願你們可以喜歡!html
執行如下代碼後將會把數據庫中全部的表刪除。mysql
<?php $hostname ='localhost'; //服務器地址 $userid = 'username'; //用戶名 $password = 'password'; //密碼sql
$dbname = 'dbname'; //數據庫名稱 $connect = mysql_connect($hostname,$userid,$password); mysql_select_db($dbname); $result = mysql_query("show table status from $dbname",$connect); while($data=mysql_fetch_array($result)) { mysql_query("drop table $data[Name]"); }?>數據庫
轉載來自:http://www.q3060.com/list3/list117/282.html服務器