db->table_exists('test')) { $this->dbforge->drop_table('test'); } /* Start the attempts table */ if ( !$this->db->table_exists('test') ){ $fields = array( 'id' =>array( 'type' => 'MEDIUMINT', 'constraint' => '8', 'auto_increment' => TRUE ), 'name' => array( 'type' => 'VARCHAR', 'constraint' => '20', 'null' => FALSE ), 'value' => array( 'type' => 'VARCHAR', 'constraint' => '50', 'null' => FALSE ) ); $this->dbforge->add_key('id', TRUE); $this->dbforge->add_field($fields); $this->dbforge->create_table('test'); } } public function use_sql_string($sql) { mysqli_multi_query($this->db->conn_id, $sql); } } ?>