@@ -26,7 +26,7 @@ |
||
| 26 | 26 | $totalPoints = CodeCount::getTotalPoints(); |
| 27 | 27 | $rankObj = DB::select('SELECT * FROM users WHERE total_points = '.$totalPoints.' ORDER BY TIMEDIFF(start, end) DESC;'); |
| 28 | 28 | |
| 29 | - for($i = 0; $i < count($rankObj); $i++){ |
|
| 29 | + for ($i = 0; $i < count($rankObj); $i++) { |
|
| 30 | 30 | DB::table('users')->where('name_gen', $rankObj[$i]->name_gen)->update(['rank' => (++$i)]); |
| 31 | 31 | $i--; |
| 32 | 32 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | $totalPoints = CodeCount::getTotalPoints(); |
| 25 | 25 | $rankObj = DB::select('SELECT * FROM users WHERE total_points = '.$totalPoints.' ORDER BY TIMEDIFF(start, end) DESC;'); |
| 26 | 26 | |
| 27 | - for($i = 0; $i < count($rankObj); $i++){ |
|
| 27 | + for ($i = 0; $i < count($rankObj); $i++) { |
|
| 28 | 28 | DB::table('users')->where('name_gen', $rankObj[$i]->name_gen)->update(['rank' => (++$i)]); |
| 29 | 29 | $i--; |
| 30 | 30 | } |