view Doc/includes/sqlite3/execute_2.py @ 47787:b32101c19bf8 legacy-trunk

Grammar fixes
author Andrew M. Kuchling <amk@amk.ca>
date Fri, 20 Jun 2008 23:14:32 +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",
    {"who": who, "age": age})
print cur.fetchone()