Location: PHPKode > projects > PhxENGINE > library/database.php
<?php defined('phxENGINE') or exit;

class Database_Library extends PDO {
    public function __construct($driver, $host, $db, $user, $pass) {
        parent::__construct($driver.':host='.$host.';dbname='.$db, $user, $pass, array(parent::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
    }

    public function query($query) {
        $query = str_replace('<<prefix>>', DB_PREF, $query);
        $stmt  = parent::query($query);
        return $stmt;
    }

    public function prepare($query) {
        $query = str_replace('<<prefix>>', DB_PREF, $query);
        $stmt  = parent::prepare($query);
        return $stmt;
    }

    public function exec($query) {
        $query = str_replace('<<prefix>>', DB_PREF, $query);
        $stmt  = parent::exec($query);
        return $stmt;
    }
}

?>
Return current item: PhxENGINE