Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with sqlite3.connect('pandemic.db') as conn:
- tobedone = """SELECT pos FROM table ORDER BY pos ASC;"""
- cursor.execute( tobedone )
- conn.commit()
- answerZ = cursor.fetchall ()
- posnew = answerZ [2]
- maxposnew = posnew [0]
- tobedone = '''UPDATE epTBL SET pos = ABS(RANDOM() % 70);'''
- cursor.execute( tobedone )
- conn.commit()
- tobedone = '''UPDATE epTBL SET pos = %s;''' % (maxposnew)
- cursor.execute( tobedone )
- conn.commit()
- tobedone = '''UPDATE epTBL SET pos = ABS(RANDOM() % %s);''' % (maxposnew)
- cursor.execute( tobedone )
- conn.commit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement