-
Notifications
You must be signed in to change notification settings - Fork 0
/
display.py
42 lines (30 loc) · 1005 Bytes
/
display.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
import mysql.connector as m
con=m.connect(host="localhost",user="root",password="PleaseEnterYourPassword",database="university")
cur=con.cursor()
def display_collage():
q="select*from collage"
cur.execute(q)
print("\n\n+++++++LIST OF COLLEGES+++++++++\n\n")
for i in cur:
print(" CODE","COLLAGE ","CITY","COURSES")
print(i)
print("="*120)
con.commit()
def display_uit():
q="select*from uit"
cur.execute(q)
print("\n\n+++++++List Of Branches And Total Seats in UIT+++++++\n\n")
for i in cur:
print("S.N."," Branch"," Total")
print(i)
print("="*120)
con.commit()
def display_uit_student():
q="select*from uit_student"
cur.execute(q)
print("\n\n+++++++List Of Student in UIT+++++++\n\n")
for i in cur:
print(" ENROLL"," NAME "," BRANCH"," GENDER"," B_G"," MOBILE")
print(i)
print("="*120)
con.commit()