PageRenderTime 7ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Doc/includes/sqlite3/execute_1.py

http://unladen-swallow.googlecode.com/
Python | 11 lines | 7 code | 4 blank | 0 comment | 0 complexity | fa0c856c92b9c95bade3a9e912b73919 MD5 | raw file
 1import sqlite3
 2
 3con = sqlite3.connect("mydb")
 4
 5cur = con.cursor()
 6
 7who = "Yeltsin"
 8age = 72
 9
10cur.execute("select name_last, age from people where name_last=? and age=?", (who, age))
11print cur.fetchone()