function down_position_home() { $min = new article(); $min->select_min('home_hot_position'); $min->where('home_hot_position >', $this->home_hot_position); $min->where('home_hot', 1); $min->get(); $o = new article(); $o->where('home_hot_position', $min->home_hot_position); $o->where('home_hot', 1); $o->get(); if ($o->result_count() > 0) { $tg = $this->home_hot_position; $this->home_hot_position = $o->home_hot_position; $o->home_hot_position = $tg; $o->save(); $this->save(); $this->arrange_position_home(); return true; } else { return false; } }