🐛 修复错误判断问题并优化代码 (#145)

* 修复错误判断问题并优化代码

* 修改成 elif

* Update database.py

---------

Co-authored-by: scdhh <51957264+shoucandanghehe@users.noreply.github.com>
This commit is contained in:
渣渣120
2023-09-01 00:41:51 +08:00
committed by GitHub
parent 1576338383
commit 564c6a8fba

View File

@@ -82,11 +82,12 @@ class DataBase():
if result is None:
trending = '?'
else:
if result[0] > trline:
trending = ''
else:
trending = ''
elif trline > result[0]:
trending = ''
elif trline == result[0]:
trending = '-'
elif trline < result[0]:
trending = ''
cursor.execute('''INSERT INTO IORANK
(RANK, TRENDING, TRLINE, PLAYERCOUNT, AVGAPM, AVGPPS, ARGVS, DATE)