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