one(array('info_id' => $id)); if (!$child) { $update['level'] = -1; } Dever::db('category/info')->update(array('where_id' => $parent, 'level' => $num - 1)); } else { $update['level'] = 1; $update['top_id'] = -1; } if (isset($update)) { $update['where_id'] = $id; Dever::db('category/info')->update($update); } } }