Overview

HTTPS SSH

PHP PDO library to simplify sql requests.

Inspired by the MeekroDB project (http://www.meekro.com/).

Initialization:

    db::$dsn  = 'mysql:host=127.0.0.1;dbname=somedb;charset=utf8';
    db::$user = 'username';
    db::$pass = 'userpass';
    db::$onfailure = function(){};
    db::$onsuccess = function($data){
        print_r($data);
    };

Use examples:

    db::insert('phpunit',array('name'=>'str'));
    db::exec("delete from phpunit");
    db::query('select * from phpunit where time=@i', 1333211598);
    db::update('phpunit', array('name'=>'str', 'time'=>true), 'id in @li', array(1,2,3));