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()