9
menuOptions="""1. show DB
14
print("select an option")
16
menuOptionsInput = input(">>>>")
19
if(menuOptionsInput == 1):
22
elif(menuOptionsInput == 2):
25
elif(menuOptionsInput == 3):
28
elif(menuOptionsInput == 4):
35
## make connectiot to DB:
37
""" This functon connects to the DB and you gain access to its
39
IE: db.execute("insert into knights values('nii', 'sir') ")
40
the DB file is located in ./awnsers.sqlite"""
41
conn = sqlite3.connect("./awnsers.sqlite") #makes the connection with the db file.
44
##check if table exists:
45
checkDB = db.execute(""" select 1 from sqlite_master where type='table' and name='awnsers' ;""", )
47
f = open("./createDB.sql")
53
#print("db allready exists! conituing.")
59
dbConn() ##connect to DB
60
getQuery =""" select * from awnsers; """
68
print("No data in table.")