请输入您要查询的百科知识:

 

词条 mysql_db_name
释义

(PHP 3 >= 3.0.6, PHP 4, PHP 5)

mysql_db_name -- 取得结果数据

说明

string mysql_db_name ( resource result, int row [, mixed field] )

mysql_db_name() 将调用 mysql_list_dbs() 返回的结果指针作为第一个参数。row 参数是结果集中的一个索引。

如果出错则返回 FALSE。用 mysql_errno() 和 mysql_error() 来确定错误的种类。

例子 1. mysql_db_name() 例子

<?php

error_reporting(E_ALL);

mysql_connect('dbhost', 'username', 'password');

$db_list = mysql_list_dbs();

$i = 0;

$cnt = mysql_num_rows($db_list);

while ($i < $cnt) {

echo mysql_db_name($db_list, $i) . "\";

$i++;

}

?>

为向下兼容也可以用 mysql_dbname()。但并不提倡。

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/2/26 2:31:17