summaryrefslogtreecommitdiff
path: root/Doc/includes/sqlite3/execute_3.py
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/includes/sqlite3/execute_3.py')
-rw-r--r--Doc/includes/sqlite3/execute_3.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/includes/sqlite3/execute_3.py b/Doc/includes/sqlite3/execute_3.py
new file mode 100644
index 0000000000..0353683fc7
--- /dev/null
+++ b/Doc/includes/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())