def get_score_in(low, high): try: conn = sqlite3.connect(db_file) cursor = conn.cursor() cursor.execute('select * from user where score >= ? and score <= ?', (low, high)) values = cursor.fetchall() finally: cursor.close() conn.commit() conn.close() return [i[1] for i in sorted(values, key=lambda x: x[2])]
Sign in to make a reply
抑郁胖子