/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
- import sqlite3
- con = sqlite3.connect("mydb")
- cur = con.cursor()
- who = "Yeltsin"
- age = 72
- cur.execute("select name_last, age from people where name_last=? and age=?", (who, age))
- print cur.fetchone()