亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

PHP mysql_list_dbs() 函數(shù)

定義和用法

mysql_list_dbs() 函數(shù)列出 MySQL 服務器中所有的數(shù)據(jù)庫。

語法

mysql_list_dbs(connection)
參數(shù) 描述
connection 可選。規(guī)定 SQL 連接標識符。如果未規(guī)定,則使用上一個打開的連接。

說明

mysql_list_dbs() 將返回一個結(jié)果指針,包含了當前 MySQL 進程中所有可用的數(shù)據(jù)庫。

用 mysql_tablename() 函數(shù)來遍歷此結(jié)果指針,或者任何使用結(jié)果表的函數(shù),例如 mysql_fetch_array()。

例子

<?php
$con = mysql_connect("localhost", "hello", "321");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

$db_list = mysql_list_dbs($con);

while ($db = mysql_fetch_object($db_list))
  {
  echo $db->Database . "<br />";
  }

mysql_close($con);
?>

輸出類似:

mysql
test
test_db