mirror of
https://github.com/FAUSheppy/open-web-leaderboard.git
synced 2025-12-06 07:01:36 +01:00
align db query with displayed rating
This commit is contained in:
@@ -50,8 +50,8 @@ def findPlayerByName(database, playerName):
|
||||
|
||||
playerInLeaderboard = player.PlayerInLeaderboard(playerRow)
|
||||
# compte rank
|
||||
cursor.execute("SELECT COUNT(*) from players where mu < ( SELECT mu from players where playerId == ? );",
|
||||
(playerInLeaderboard.playerId,))
|
||||
cursor.execute("SELECT COUNT(*) from players where (mu-2*sigma) > (?-2*?);",
|
||||
(playerInLeaderboard.mu, playerInLeaderboard.sigma))
|
||||
rank = cursor.fetchone()[0]
|
||||
conn.close()
|
||||
return (playerInLeaderboard, rank)
|
||||
|
||||
Reference in New Issue
Block a user