mysqli = new mysqli($config["db_host"], $config["db_user"], $config["db_pass"], $config["db_name"], $config["db_port"]); if ($this->mysqli->connect_errno) { die("Failed to connect to database: (" . $this->mysqli->connect_errno . ") " . $this->mysqli->connect_error); }; } public function query($query="") { return $this->mysqli->query($query); } public function escape($string="") { return $this->mysqli->real_escape_string($string); } }