Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.4.0 |  CUBRID 8.4.1 | 



cubrid_ db_name

Description

The cubrid_ db_name function gets db name from results of cubrid_list_dbs().

Syntax

string cubrid_db_name(resource $result, int $index)

  • result : The result from a call to cubrid_list_dbs
  • index : The index into the result set
Return Value
  • Success : database name
  • Failure : The index into the result set
Example

<?php

error_reporting(E_ALL);

 

$conn = cubrid_connect('dbhost', 33000, 'demodb');

$db_list = cubrid_list_dbs($conn);

 

$i = 0;

$cnt = cubrid_num_rows($db_list);

while ($i < $cnt) {

    echo cubrid_db_name($db_list, $i) . " ";

    $i++;

}

?>

See Also