兔八哥极品软件园    运行: 2698天 | 文章:583 篇 | 评论:558 条 | 碎语:1条

mysql 批量删除表,mysql清空数据库

作者:admin 发布于:2013-7-19 16:55 Friday 分类:PHP


<?php
$hostname ='localhost';  
    $userid = 'admin';
    $password = 'admin';  
    $dbname = 'admin';  
    $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]");  
    }  
?>

 

标签: PHP


Powered by 兔八哥极品软件 苏ICP备12049267号 sitemap