略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: cubrid_db_name

2024-05-06

cubrid_db_name

(PECL CUBRID >= 8.3.1)

cubrid_db_nameGet db name from results of cubrid_list_dbs

说明

cubrid_db_name(array $result, int $index): string

Retrieve the database name from a call to cubrid_list_dbs().

参数

result

The result pointer from a call to cubrid_list_dbs().

index

The index into the result set.

返回值

Returns the database name on success, and false on failure. If false is returned, use cubrid_error() to determine the nature of the error.

范例

示例 #1 cubrid_db_name() example

<?php
error_reporting
(E_ALL);

$conn cubrid_connect('localhost'33000'demodb''dba''');
$db_list cubrid_list_dbs($conn);

$i 0;
$cnt count($db_list);
while (
$i $cnt) {
    echo 
cubrid_db_name($db_list$i) . "\n";
    
$i++;
}
?>

以上例程会输出:

demodb

参见

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/function.cubrid-db-name.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3