Guest User

Untitled

a guest
Feb 15th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. output = ((5153419, 5178566), (5153419, 5178568), (5153419, 5178565), (5153419, 5178562), (5153419, 5178567), (5153419, 5178563), (5153419, 5178561), (5153419, 5178564))
  2.  
  3. connection = sqlite3.connect("test_database.db")
  4. c = connection.cursor()
  5. c.execute("DROP TABLE IF EXISTS Meeting")
  6. c.execute("CREATE TABLE Meeting(MeetingID INT, RaceID INT)")
  7. c.executemany("INSERT INTO Meeting VALUES(?,?)", output)
  8. c.execute("SELECT MeetingID, RaceID from Meeting")
  9.  
  10. for row in c.fetchall():
  11. print(row)
  12.  
  13. ## Output
  14.  
  15. [saythrenshaw@localhost racing]$ /usr/bin/python3 /home/saythrenshaw/racing/parse_nsw.py
  16. (5153419, 5178566)
  17. (5153419, 5178568)
  18. (5153419, 5178565)
  19. (5153419, 5178562)
  20. (5153419, 5178567)
  21. (5153419, 5178563)
  22. (5153419, 5178561)
  23. (5153419, 5178564)
Add Comment
Please, Sign In to add comment