def get_score_in(low, high):
' 返回指定分数区间的名字,按分数从低到高排序 '
conn = sqlite3.connect(db_file)
cursor = conn.cursor()
cursor.execute('select * from user where score >=? and score<=? order by score asc', (low, high))
values =[x[1] for x in cursor.fetchall()]
cursor.close()
conn.close()
return values
Sign in to make a reply
偘
def get_score_in(low, high):
' 返回指定分数区间的名字,按分数从低到高排序 '
conn = sqlite3.connect(db_file)
cursor = conn.cursor()
cursor.execute('select * from user where score >=? and score<=? order by score asc', (low, high))
values =[x[1] for x in cursor.fetchall()]
cursor.close()
conn.close()
return values