public function update() { $a = new Item(); $data = array("brand_id" => $this->input->post("brand_id"), "type" => $this->input->post("type"), "name" => $this->input->post("name"), "price" => $this->input->post("price")); if ($this->input->post("type") == "ban") { $data["size"] = $a->reArange_size($this->input->post("size1"), $this->input->post("size2")); } $this->system_queries_model->update_row($this->main_table, $this->input->post("id"), $data); redirect(base_url() . "index.php/" . $this->section); }