Mercurial > cpython-lru_cache-weakref
view Doc/includes/sqlite3/execute_3.py @ 49987:54c19a1bbabd 2.6
Post-2.6.1 tweak
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Fri, 05 Dec 2008 05:03:06 +0000 |
| parents | c62f6669ae22 |
| children |
line wrap: on
line source
import sqlite3 con = sqlite3.connect("mydb") cur = con.cursor() who = "Yeltsin" age = 72 cur.execute("select name_last, age from people where name_last=:who and age=:age", locals()) print cur.fetchone()
