test db connection module

This commit is contained in:
Steinader 2020-12-14 13:10:16 +01:00 committed by Steinadler
parent 164a8db7f5
commit 5985f3d12a
1 changed files with 14 additions and 0 deletions

14
Jan/dbtest_sql.py Normal file
View File

@ -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()