view Doc/includes/sqlite3/execute_2.py @ 49790:7aaa3affecc1

Fix minor typos.
author Raymond Hettinger <python@rcn.com>
date Fri, 21 Nov 2008 10:40:51 +0000
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",
    {"who": who, "age": age})
print(cur.fetchone())