function down_position() { $min = new sitelanguage(); $min->select_min('position'); $min->where('position >', $this->position); $min->get(); $o = new sitelanguage(); $o->where('position', $min->position); $o->get(); if ($o->result_count() > 0) { $tg = $this->position; $this->position = $o->position; $o->position = $tg; $o->save(); $this->save(); return true; } else { return false; } }