Bureaucrats, cc_docs_admin, cc_staff
2,318
edits
Line 23: | Line 23: | ||
# to access an SQLite database | # to access an SQLite database | ||
import sqlite3 | import sqlite3 | ||
age = 34 | |||
# Connect to the database... | # Connect to the database... | ||
dbase = sqlite3.connect("foo.sqlite") | dbase = sqlite3.connect("foo.sqlite") | ||
dbase.execute("INSERT INTO employee(name,age) VALUES(\"John Smith\"," + str(age) + ");") | |||
# Close the database connection | # Close the database connection |