Skip to content

Commit be7a04a

Browse files
committed
Fixed order of matches
1 parent fcfaed3 commit be7a04a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/Helpers/MatchesHelper.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public function getMatches(int $page = 1): array
2929
SELECT matches_maps.*
3030
FROM matches
3131
LEFT JOIN matches_maps ON matches_maps.matchid = matches.matchid
32-
ORDER BY matches.end_time
33-
DESC LIMIT :offset, :limit
32+
ORDER BY matches_maps.end_time DESC
33+
LIMIT :offset, :limit
3434
', [
3535
':offset' => $offset,
3636
':limit' => (int)$limit
@@ -55,8 +55,8 @@ public function getLatestMatches(int $limit = 3)
5555
SELECT matches_maps.*
5656
FROM matches
5757
LEFT JOIN matches_maps ON matches_maps.matchid = matches.matchid
58-
ORDER BY matches.end_time
59-
DESC LIMIT :limit
58+
ORDER BY matches_maps.end_time DESC
59+
LIMIT :limit
6060
', [
6161
':limit' => (int)$limit
6262
]);
@@ -161,7 +161,8 @@ public function getPlayerMatches(string $steamId, int $matches = 3): array
161161
LEFT JOIN matches_maps ON matches_maps.matchid = matches.matchid
162162
LEFT JOIN matches_players ON matches_players.matchid = matches.matchid
163163
WHERE matches_players.steam = :steam
164-
ORDER BY matches_maps.end_time DESC LIMIT :limit
164+
ORDER BY matches_maps.end_time DESC
165+
LIMIT :limit
165166
', [
166167
':steam' => $steamId,
167168
':limit' => $matches,

0 commit comments

Comments
 (0)