php如何写删除整个数据库语句呢?大师
时间:2021-07-01 10:21:17
帮助过:18人阅读
php怎么写删除整个数据库语句呢?请教各位大师!
$hostnames = 'localhost';
$userids = 'root';
$passwords = '123456';
$database = '213';
$conn = mysql_connect($hostnames,$userids,$passwords);
mysql_select_db($database,$conn);
$sql = "drop database `213`";
mysql_close($conn);
------解决方案--------------------
$conn = mysql_connect($hostnames,$userids,$passwords);
mysql_select_db($database,$conn);
mysql_query("drop database `213`");
mysql_close($conn);