Style changes
- Turns out we use OR elsewhere in expression context (even though it's technically an undocumented behavior), so use it here as well for consistency - Change indents to match other SQL statement indentation - Change join condition ordering to put the joined table first (personal nit I enjoy picking)
This commit is contained in:
parent
7552c492d6
commit
4f5d3f1371
14
src/db.py
14
src/db.py
@ -352,13 +352,13 @@ def get_player_totals(acc, hostmask):
|
||||
totals = []
|
||||
for row in c:
|
||||
tmp[row[0]] = row[1]
|
||||
c.execute("""SELECT SUM(gp.team_win | gp.indiv_win)
|
||||
FROM game_player gp
|
||||
JOIN player pl
|
||||
ON gp.player = pl.id
|
||||
JOIN person pe
|
||||
ON pl.person = pe.id
|
||||
WHERE pe.id = ?""", (peid,))
|
||||
c.execute("""SELECT SUM(gp.team_win OR gp.indiv_win)
|
||||
FROM game_player gp
|
||||
JOIN player pl
|
||||
ON pl.id = gp.player
|
||||
JOIN person pe
|
||||
ON pe.id = pl.person
|
||||
WHERE pe.id = ?""", (peid,))
|
||||
won_games = c.fetchone()[0]
|
||||
order = role_order()
|
||||
name = _get_display_name(peid)
|
||||
|
Loading…
x
Reference in New Issue
Block a user