Icon edb_db

Returns the current database name for a connection.

Syntax
edb_db(<ConnectionHandle>)

<ConnectionHandle> =

Handle of connection returned by edb_connect function

Returns
The current database name (STRING) if successful, or
FALSE if there are any errors

Usage
The edb_db function returns the current database name for a connection. There is always a current database for any given connection, so this function will always return a value unless there is an error.

Examples
<?php

// The following script connects to an ElevateDB
// Server and database, displays the database
// name using the edb_db() function, and then
// disconnects using the edb_disconnect() function

$con = edb_connect("type=remote;charset=Ansi;address=127.0.0.1;"+
                   "uid=Administrator;pwd=EDBDefault;database=Test");
if (!$con)
  {
  die("Could not connect: " . edb_errmsg());
  }
echo edb_db($con);
edb_disconnect($con);
?>
Image