# Collection of code snippets by Arne Vajhøj 
# (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import sqlite3

con = sqlite3.connect('test.db')
c = con.cursor()
c.execute('INSERT INTO orders VALUES(?,?,?,?)', (13, 1, 'By Python', 'Open'))
c.execute('INSERT INTO orderlines VALUES(?,?,?,?)', (30, 13, 'Stuff', 5))
c.execute('INSERT INTO orderlines VALUES(?,?,?,?)', (31, 13, 'Other stuff', 5))
con.commit()
con.close()
print('Python - insert OK')
