view Doc/includes/sqlite3/execute_3.py @ 80605:c28f593ea0cb

#16556: merge with 3.3.
author Ezio Melotti <ezio.melotti@gmail.com>
date Tue, 27 Nov 2012 19:19:01 +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())