From 5985f3d12afd947fab0fa10b9f20e0d707810d42 Mon Sep 17 00:00:00 2001 From: Steinader Date: Mon, 14 Dec 2020 13:10:16 +0100 Subject: [PATCH] test db connection module --- Jan/dbtest_sql.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Jan/dbtest_sql.py diff --git a/Jan/dbtest_sql.py b/Jan/dbtest_sql.py new file mode 100644 index 0000000..557fb50 --- /dev/null +++ b/Jan/dbtest_sql.py @@ -0,0 +1,14 @@ +import sqlite3 + +con = sqlite3.connect("../test1.db") +c = con.cursor() + +sql = """select f.text, a.text +from frage f +join antwort a on f.id = a.frage_id""" + +c.execute(sql) + +select = c.fetchall() + +c.close()