view Doc/includes/sqlite3/execute_3.py @ 86127:a3d09c19bb93

merge with 3.3
author Georg Brandl <georg@python.org>
date Sun, 06 Oct 2013 19:24:00 +0200
parents 9e1529bf0442
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())