public function __construct($method, $uri) { $this->supportedResources = array('addresses' => array('table' => 'address', 'id' => 'ADDRESSID')); $this->db = mysql_connect(Config::DBHOST, Config::DBUSER, Config::DBPASS); mysql_select_db(Config::DBNAME); mysql_query('SET NAMES utf8'); if (!$this->db) { throw new Exception('Database not available: ' . mysql_error()); } parent::__construct($method, $uri, new Serializer()); }
public function __construct($request) { parent::__construct($request); $this->db = new SQLite3("/home/www-data/www/sp_admin/sp_admin"); }