-
Notifications
You must be signed in to change notification settings - Fork 0
/
update.py
63 lines (51 loc) · 2.03 KB
/
update.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
53
54
55
56
57
58
59
60
61
62
63
import mysql.connector as m
con=m.connect(host="localhost",user="root",password="PleaseEnterYourPassword",database="university")
cur=con.cursor()
def update_in_collage1():
u1=int(input("\n\nEnter code in which you want to update?\t"))
u2=input("Enter collage name you want to update\t")
q=("update collage set cname = %s where code=%s")
t=(u2,u1)
cur.execute(q,t)
con.commit()
print("\n\nData Update Sucessfully")
def update_in_collage2():
u1=int(input("\n\nEnter code in which you want to update?\t"))
u2=input("Enter courses you want to update\t")
q=("update collage set courses = %s where code=%s")
t=(u2,u1)
cur.execute(q,t)
con.commit()
print("\n\nData Update Sucessfully")
def update_in_uit():
u1=int(input("\n\nEnter Serial Number in which you want to update?\t"))
u2=input("Enter seats you want to update\t")
q=("update uit set seats = %s where sn=%s")
t=(u2,u1)
cur.execute(q,t)
con.commit()
print("\n\nData Update Sucessfully")
def update_in_uit_student1():
u1=int(input("\n\nEnter Enrollment Number in which you want to do updation?\t"))
u2=input("Enter branch name you want to update\t")
q=("update uit_student set branch = %s where enroll=%s")
t=(u2,u1)
cur.execute(q,t)
con.commit()
print("\n\nData Update Sucessfully")
def update_in_uit_student2():
u1=int(input("\n\nEnter Enrollment Number in which you want to do updation?\t"))
u2=input("Enter Blood Group you want to update\t")
q=("update uit_student set blood_g = %s where enroll=%s")
t=(u2,u1)
cur.execute(q,t)
con.commit()
print("\n\nData Update Sucessfully")
def update_in_uit_student3():
u1=int(input("\n\nEnter Enrollment Number in which you want to do updation?\t"))
u2=input("Enter Mobile Number which you want to update\t")
q=("update uit_student set mobile= %s where enroll=%s")
t=(u2,u1)
cur.execute(q,t)
con.commit()
print("\n\nData Update Sucessfully")