PEAR Manual
Prev |  | Next

# DB_common::disconnect()

DB_common::disconnect() -- Disconnects from a database

## Synopsis

``boolean disconnect` ()`

## Description

Disconnects from a database

## Return value

boolean - Returns `TRUE` on success, `FALSE` on failure.

## Note

This function can not be called statically.

## Example

Example 33-1. Using disconnect()
    <?php
    require_once 'DB.php';

    $db =& DB::connect('pgsql://someuser:apasswd@localhost/thedb');
    if (PEAR::isError($db)) {
        die($db->getMessage());
    }

    $db->disconnect();
    ?>

## See

connect(), "Intro - Connect"

Prev | Home | Next
DB_common::createSequence() | Up | DB_common::dropSequence()