From a02b6832729e2fee18818fb2bd72f4b49fa234ce Mon Sep 17 00:00:00 2001 From: FinnHornhoover Date: Mon, 25 Dec 2023 09:07:44 +0300 Subject: [PATCH] reverted personal ranking sql --- rankendpoint.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rankendpoint.py b/rankendpoint.py index d4e5d4e..57cdd78 100644 --- a/rankendpoint.py +++ b/rankendpoint.py @@ -77,10 +77,12 @@ def fetch_my_ranks(pcuid, epid, date): RaceResults.PlayerID, Players.FirstName, Players.LastName, - MAX(RaceResults.Score) AS MaxScore + RaceResults.Score FROM RaceResults INNER JOIN Players ON RaceResults.PlayerID=Players.PlayerID - WHERE RaceResults.PlayerID=? AND EPID=? AND DATETIME(Timestamp, 'unixepoch') > DATETIME('now', ?); + WHERE RaceResults.PlayerID=? AND EPID=? AND DATETIME(Timestamp, 'unixepoch') > DATETIME('now', ?) + ORDER BY RaceResults.Score DESC + LIMIT 1; """ args = (pcuid, epid, date)