public function setSort() { foreach ($this->sort as $key => $value) { $_sql .= "update nav set sort=" . $value . " where id=" . $key . ";"; } //echo $_sql; return parent::multi_query($_sql); }