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.

范例

Example #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

参见

相关文章
php cubrid cubrid mysql 兼容性函数php cubrid mysql 兼容性函数 return the number of rows affected by the last sql statementphp cubrid mysql 兼容性函数 return the current cubrid connection charsetphp cubrid mysql 兼容性函数 close cubrid connectionphp cubrid mysql 兼容性函数 get db name from results of cubrid list dbsphp cubrid mysql 兼容性函数 return the numerical value of the error message from previous cubrid operationphp cubrid mysql 兼容性函数 get the error messagephp cubrid mysql 兼容性函数 get column information from a result and return as an objectphp cubrid mysql 兼容性函数 return an array with the lengths of the values of each field from the current rowphp cubrid mysql 兼容性函数 return a string with the flags of the given field offsetphp cubrid mysql 兼容性函数 get the maximum length of the specified fieldphp cubrid mysql 兼容性函数 return the name of the specified field indexphp cubrid mysql 兼容性函数 move the result set cursor to the specified field offsetphp cubrid mysql 兼容性函数 return the name of the table of the specified fieldphp cubrid mysql 兼容性函数 return the type of the column corresponding to the given field offsetphp cubrid mysql 兼容性函数 return an array with the list of all existing cubrid databasesphp cubrid mysql 兼容性函数 send a cubrid queryphp cubrid mysql 兼容性函数 escape special characters in a string for use in an sql statementphp cubrid mysql 兼容性函数 return the value of a specific field in a specific rowphp cubrid mysql 兼容性函数 perform a query without fetching the results into memory
关注编程学问公众号