test db connection module
This commit is contained in:
parent
164a8db7f5
commit
5985f3d12a
|
@ -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()
|
Loading…
Reference in New Issue