Skip to content

Commit

Permalink
Fixed order of matches
Browse files Browse the repository at this point in the history
  • Loading branch information
B3none committed Mar 29, 2020
1 parent fcfaed3 commit be7a04a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Helpers/MatchesHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public function getMatches(int $page = 1): array
SELECT matches_maps.*
FROM matches
LEFT JOIN matches_maps ON matches_maps.matchid = matches.matchid
ORDER BY matches.end_time
DESC LIMIT :offset, :limit
ORDER BY matches_maps.end_time DESC
LIMIT :offset, :limit
', [
':offset' => $offset,
':limit' => (int)$limit
Expand All @@ -55,8 +55,8 @@ public function getLatestMatches(int $limit = 3)
SELECT matches_maps.*
FROM matches
LEFT JOIN matches_maps ON matches_maps.matchid = matches.matchid
ORDER BY matches.end_time
DESC LIMIT :limit
ORDER BY matches_maps.end_time DESC
LIMIT :limit
', [
':limit' => (int)$limit
]);
Expand Down Expand Up @@ -161,7 +161,8 @@ public function getPlayerMatches(string $steamId, int $matches = 3): array
LEFT JOIN matches_maps ON matches_maps.matchid = matches.matchid
LEFT JOIN matches_players ON matches_players.matchid = matches.matchid
WHERE matches_players.steam = :steam
ORDER BY matches_maps.end_time DESC LIMIT :limit
ORDER BY matches_maps.end_time DESC
LIMIT :limit
', [
':steam' => $steamId,
':limit' => $matches,
Expand Down

0 comments on commit be7a04a

Please sign in to comment.