PEAR::DB replacement class

Contents

Connecting

To connect to mysql you do something like this:

<?php 
    $db = DB::Connect();
?>

This uses the public static DB class variables $host, $user, $pass, $host and $dbas. Additionally you can also set $dbug to turn on the debug window. For example:

<?php
    DB::$user = 'root';
    DB::$pass = '';
    DB::$host = 'localhost;
    DB::$dbas = 'mysql';
    DB::$dbug = true;

    $db = DB::Connect();
?>