cubrid_db_name
(PECL CUBRID >= 8.3.1)
cubrid_db_name — Get db name from results of cubrid_list_dbs
Description
string cubrid_db_name
( array
$result
, int $index
)Retrieve the database name from a call to cubrid_list_dbs().
Parameters
-
result
-
The result pointer from a call to cubrid_list_dbs().
-
index
-
The index into the result set.
Return Values
Returns the database name on success, and FALSE
on failure. If FALSE
is returned, use cubrid_error() to determine the nature
of the error.
Examples
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++;
}
?>
The above example will output:
demodb
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Расширения для работы с базами данных
- Расширения для работы с базами данных отдельных производителей
- CUBRID
- cubrid_affected_rows
- cubrid_client_encoding
- cubrid_close
- cubrid_data_seek
- cubrid_db_name
- cubrid_errno
- cubrid_error
- cubrid_fetch_array
- cubrid_fetch_assoc
- cubrid_fetch_field
- cubrid_fetch_lengths
- cubrid_fetch_object
- cubrid_fetch_row
- cubrid_field_flags
- cubrid_field_len
- cubrid_field_name
- cubrid_field_seek
- cubrid_field_table
- cubrid_field_type
- cubrid_list_dbs
- cubrid_num_fields
- cubrid_ping
- cubrid_query
- cubrid_real_escape_string
- cubrid_result
- cubrid_unbuffered_query
Коментарии
404 Not Found