mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 12:58:40 +00:00
fix(web/contest): group reg
This commit is contained in:
parent
5121b733bd
commit
a35ab7bfdf
@ -42,7 +42,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DB::query("replace into contests_registrants (username, user_rating, contest_id, has_participated) values ('{$user['username']}', {$user['rating']}, {$contest['id']}, 0)");
|
DB::query("replace into contests_registrants (username, contest_id, has_participated) values ('{$user['username']}', {$contest['id']}, 0)");
|
||||||
|
|
||||||
updateContestPlayerNum($contest);
|
updateContestPlayerNum($contest);
|
||||||
};
|
};
|
||||||
@ -74,7 +74,7 @@
|
|||||||
$users = DB::selectAll("select b.username as username, b.rating as rating from groups_users a inner join user_info b on a.username = b.username where a.group_id = $group_id");
|
$users = DB::selectAll("select b.username as username, b.rating as rating from groups_users a inner join user_info b on a.username = b.username where a.group_id = $group_id");
|
||||||
|
|
||||||
foreach ($users as $user) {
|
foreach ($users as $user) {
|
||||||
DB::query("replace into contests_registrants (username, user_rating, contest_id, has_participated) values ('{$user['username']}', {$user['rating']}, {$contest['id']}, 0)");
|
DB::query("replace into contests_registrants (username, contest_id, has_participated) values ('{$user['username']}', {$contest['id']}, 0)");
|
||||||
}
|
}
|
||||||
|
|
||||||
updateContestPlayerNum($contest);
|
updateContestPlayerNum($contest);
|
||||||
|
Loading…
Reference in New Issue
Block a user