def get_score_in(low,high):
conn=sqlite3.connect(db_file)
cursor=conn.cursor()
cursor.execute('select name from user where score between ? and ? order by score',(low,high))
values=cursor.fetchall()
cursor.close()
conn.commit()
conn.close()
return [v[0] for v in values]
Sign in to make a reply
浅言87780
def get_score_in(low,high):
conn=sqlite3.connect(db_file)
cursor=conn.cursor()
cursor.execute('select name from user where score between ? and ? order by score',(low,high))
values=cursor.fetchall()
cursor.close()
conn.commit()
conn.close()
return [v[0] for v in values]