summaryrefslogtreecommitdiffstats
path: root/Doc/lib/sqlite3/execute_1.py
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/lib/sqlite3/execute_1.py')
-rw-r--r--Doc/lib/sqlite3/execute_1.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/lib/sqlite3/execute_1.py b/Doc/lib/sqlite3/execute_1.py
new file mode 100644
index 0000000..fb3784f
--- /dev/null
+++ b/Doc/lib/sqlite3/execute_1.py
@@ -0,0 +1,11 @@
+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()