fork download
  1. import sqlite3
  2.  
  3. conn = sqlite3.connect('tempory.db')
  4. c = conn.cursor()
  5.  
  6. Views = 0
  7.  
  8. c.execute('select * from Links')
  9. for row in c:
  10. url = row[1]
  11. print url
  12. c.execute("UPDATE Links SET Views=? WHERE url=?", (Views, url))
  13. conn.commit()
  14.  
  15. c.close()
Runtime error #stdin #stdout #stderr 0.02s 10128KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 3, in <module>
sqlite3.OperationalError: unable to open database file