Discuss / Python / 小练习学习

小练习学习

Topic source

好好..........上

  9 def get_score_in(low,high):
 10         conn=sqlite3.connect(db_file)
 11         cursor=conn.cursor()
 12         cursor.execute('select name from user where score between ? and ? or    der by score',(str(low),str(high)))
 13         values=cursor.fetchall()
 14         cursor.close()
 15         conn.close()
 16         return values

  • 1

Reply