Icon edb_disconnect

Disconnects a connection, freeing all associated resources.

Syntax
edb_disconnect(<ConnectionHandle>)

<ConnectionHandle> =

Handle of connection returned by edb_connect function

Returns
TRUE if successful, or FALSE if any errors

Usage
The edb_disconnect function disconnects a connection, freeing the handle and all associate resources. Any attempts to use the connection handle after calling edb_disconnect will result in an error.

Information Any connections, and their associated resources, are automatically disconnected and freed when a PHP script finishes executing, so use of this function is optional.

Examples
<?php

// The following script connects to a local
// ElevateDB configuration and database, displays
// the configuration path using the edb_connset()
// function, and then disconnects using the edb_disconnect()
// function

$con = edb_connect("type=local;charset=Ansi;configpath=C:\\Tutorial;"+
                   "uid=Administrator;pwd=EDBDefault;database=Tutorial");
if (!$con)
  {
  die("Could not connect: " . edb_errmsg());
  }
echo edb_connset($con,"configpath");
edb_disconnect($con);
?>
Image