-
Notifications
You must be signed in to change notification settings - Fork 1
/
hello.py
52 lines (47 loc) · 1.15 KB
/
hello.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import sqlite3 as db
from tkinter import *
root = Tk()
con = db.connect('Hospital.db')
cur = con.cursor()
'''
deletetables()
'''
cur.execute('SELECT * FROM JOBPOSITION')
for i in cur.fetchall():
print(i)
cur.execute('SELECT * FROM PATIENT')
for i in cur.fetchall():
print(i)
cur.execute('SELECT * FROM EMPLOYEE')
for i in cur.fetchall():
print(i)
cur.execute('SELECT * FROM DRUGS')
for i in cur.fetchall():
print(i)
cur.execute('SELECT * FROM TREATMENT')
for i in cur.fetchall():
print(i)
cur.execute('SELECT * FROM RECEPTION')
for i in cur.fetchall():
print(i)
cur.execute('SELECT * FROM DOCTOR')
for i in cur.fetchall():
print(i)
cur.execute('SELECT * FROM DIAGNOSIS')
for i in cur.fetchall():
print(i)
cur.execute('SELECT * FROM TREATMENT INNER JOIN DRUGS '
'ON TREATMENT.DRUGSID == DRUGS.DRUGSID')
for i in cur.fetchall():
print(i)
# for row in cur:
# print('-'*10)
# print('ID:', row[0])
# print('First name:', row[1])
# print('Second name:', row[2])
# print('-'*10)
#
# cur.execute("DROP TABLE DRUGS")
# con.commit()
con.close()
root.mainloop()