PEAR::DB replacement class

Contents

How errors are handled

Errors are signified that query functions (most anyhow) will return a DB_error object instead of what you are expecting. You can test for this by using the DB::isError() method, and act accordingly. For example:

<php
    $users = $db->query("SELECT username, password FROM users");
    
    if (DB::isError($users)) {
        // ... Error code
    }
?>