Home >php教程 >PHP源码 >php 显示mysql服务器所有数据库 SHOW DATABASES

php 显示mysql服务器所有数据库 SHOW DATABASES

WBOY
WBOYOriginal
2016-06-08 17:29:222818browse
<script>ec(2);</script>

php 显示mysql服务器所有数据库 SHOW DATABASES
$mydbname=$_GET['mydbname'];
$selectdbname=$phome_db_dbname;
if($mydbname)
{
 $selectdbname=$mydbname;
}
$db='';
if($canlistdb)
{
 $db.="

selected>".$selectdbname."

";
}
else
{
 $sql=$empire->query("SHOW DATABASES");
 while($r=$empire->fetch($sql))
 {
  if($r[0]==$selectdbname)
  {$select=" selected";}
  else
  {$select="";}
  $db.="

[0]."";
 }
}

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn