mirror of
https://github.com/python/cpython.git
synced 2026-05-21 03:44:14 -04:00
82560ebb8d
quite some content to move over from the pysqlite manual, but it's a start now.
12 lines
214 B
Python
12 lines
214 B
Python
import sqlite3
|
|
|
|
con = sqlite3.connect("mydb")
|
|
|
|
cur = con.cursor()
|
|
|
|
who = "Yeltsin"
|
|
age = 72
|
|
|
|
cur.execute("select name_last, age from people where name_last=? and age=?", (who, age))
|
|
print cur.fetchone()
|