diff options
Diffstat (limited to 'Doc/lib/sqlite3/execute_3.py')
-rw-r--r-- | Doc/lib/sqlite3/execute_3.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/lib/sqlite3/execute_3.py b/Doc/lib/sqlite3/execute_3.py new file mode 100644 index 0000000..b64621f --- /dev/null +++ b/Doc/lib/sqlite3/execute_3.py @@ -0,0 +1,12 @@ +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() |