Location: PHPKode > scripts > Ajaxmint Gallery > ajaxmint-gallery/system/libs/db.php
<?php
final class DB {
	private $driver;
	
	public function __construct($driver, $hostname, $username, $password, $database) {
		if (file_exists(DIR_SYSTEM ."/db/". $driver . '.php')) {
			require_once(DIR_SYSTEM ."/db/" . $driver . '.php');
		} else {
			exit('Error: Could not load database file ' . $driver . '!');
		}
				
		$this->driver = new $driver($hostname, $username, $password, $database);
	}
		
  	public function query($sql) {
		return $this->driver->query($sql);
  	}
	
	public function escape($value) {
		return $this->driver->escape($value);
	}
	
  	public function countAffected() {
		return $this->driver->countAffected();
  	}

  	public function getLastId() {
		return $this->driver->getLastId();
  	}	
}
Return current item: Ajaxmint Gallery