function Update ($table, $data) { $this->db->where($table.'Id', $data[$table.'Id']); $this->db->update($table, $data); return true; }