From 6641fad072fda316f5d35059317f48db34818630 Mon Sep 17 00:00:00 2001 From: spla Date: Sat, 5 Dec 2020 16:06:55 +0100 Subject: [PATCH] Fix #11. Count games with moves > 0 only --- mastochess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastochess.py b/mastochess.py index e2cb6c7..0809dd2 100644 --- a/mastochess.py +++ b/mastochess.py @@ -864,7 +864,7 @@ def get_stats(player): cur = conn.cursor() - cur.execute("select count(*) from stats where white_user = (%s) or black_user = (%s) and finished", (player, player)) + cur.execute("select count(*) from games where (white_user = (%s) or black_user = (%s)) and finished and moves > 0", (player, player)) row = cur.fetchone()