qls = &$qls; /** * These security functions are in here because of the file * included above. I'll have to change it in later versions 0.o */ // Install the system if it is not already include '/app/database_info.php'; if (SYSTEM_INSTALLED !== true) { header('Location: /install/install.php'); } /** * End of security functions */ $this->database_type = $database_type; $this->qls->config['sql_prefix'] = $database_prefix; // Get the actual database class require_once('MySQLie.class.php'); switch ($database_type) { // Default is MySQLi default: case 'MySQLi': $this->current_layer = new MySQLie($database_server_name, $database_username, $database_password, $database_name, $this->qls, $database_port ); break; } } /** * These functions run the functions in the database classes. See those * files for more information. */ function update_queries() { $this->current_layer->update_queries(); } function affected_rows() { return $this->current_layer->affected_rows(); } function fetch_row($result) { return $this->current_layer->fetch_row($result); } function fetch_assoc($result) { return $this->current_layer->fetch_assoc($result); } function fetch_array($result) { return $this->current_layer->fetch_array($result); } function free_result($result) { return $this->current_layer->free_result($result); } function get_client_info() { return $this->current_layer->get_client_info(); } function insert_id() { return $this->current_layer->insert_id(); } function num_fields($result) { return $this->current_layer->num_fields($result); } function num_rows($result) { return $this->current_layer->num_rows($result); } function transaction($status = 'BEGIN') { return $this->current_layer->transaction($status); } function select($what, $from, $where = false, $order_by = false, $limit = false) { return $this->current_layer->select($what, $from, $where, $order_by, $limit); } function delete($from, $where) { return $this->current_layer->delete($from, $where); } function update($table, $set, $where) { return $this->current_layer->update($table, $set, $where); } function insert($table, $columns, $values) { return $this->current_layer->insert($table, $columns, $values); } function alter($table, $action, $column, $data_type = false, $null = false, $default_value = false) { return $this->current_layer->alter($table, $action, $column, $data_type, $null, $default_value); } function create_db($org_id) { return $this->current_layer->create_db($org_id); } function drop_db($org_id) { return $this->current_layer->drop_db($org_id); } function create_app_table() { return $this->current_layer->create_app_table(); } function drop_table($table_name) { return $this->current_layer->drop_table($table_name); } function query($query) { return $this->current_layer->query($query); } function close() { return $this->current_layer->close(); } } ?>