fix: order by dfn

This commit is contained in:
Baoshuo Ren 2022-09-18 20:20:25 +08:00
parent aa5e3063dc
commit bb5de2a00e
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -46,7 +46,7 @@ function queryContestData($contest, $config = array(), $is_after_contest_query =
$problems = []; $problems = [];
$prob_pos = []; $prob_pos = [];
$n_problems = 0; $n_problems = 0;
$result = DB::query("select problem_id from contests_problems where contest_id = {$contest['id']} order by problem_id"); $result = DB::query("select problem_id from contests_problems where contest_id = {$contest['id']} order by dfn");
while ($row = DB::fetch($result, MYSQLI_NUM)) { while ($row = DB::fetch($result, MYSQLI_NUM)) {
$prob_pos[$problems[] = (int)$row[0]] = $n_problems++; $prob_pos[$problems[] = (int)$row[0]] = $n_problems++;
} }