PEAR Manual
Prev |  | Next

# ->getDatabaseConnection()

->getDatabaseConnection() -- Get the PEAR Database Object

## Synopsis

``object $DB_DataObject->getDatabaseConnection` ()`

## Description

Fetch the pear database connection that the object uses - so you can find information or send queries directly to it.

## Note

This function can not be called statically.

## Example

Example 33-1. getting the connection
    $person = new DataObjects_Person;
    $db=  &$person->getDatabaseConnection();
    echo $db->phptype;

Example 33-2. Sample Output
    1000_monkeys

Prev | Home | Next
->keys() | Up | ->getDatabaseResult()