import mysql
import mysql
connector as pro
def add_food():
e.execute("INSERT INTO item VALUES ({}, '{}', {}, '{}')".format(ser, fi, fp, ft)) print("NEW FOOD ADDED
SUCCESSFULLY")
d.commit()
def update_food():
if us == 1:
fnid = int(input("Enter the Food ID whose food name you want to update: ")) fna = input("Enter the
updated Food Name: ")
e.execute("UPDATE item SET Food_Item = '{}' WHERE S_no = {}".format(fna, fnid)) print("UPDATED
SUCCESSFULLY")
d.commit()
elif us == 2:
fnic = int(input("Enter the Food ID whose food price you want to update: ")) fnf = input("Enter the
updated Food Price: ")
e.execute("UPDATE item SET Prices = {} WHERE S_no = {}".format(fnf, fnic)) print("UPDATED
SUCCESSFULLY")
d.commit()
def delete_food():
d.commit()
def view_orders():
e.execute(fgg)
rtt = e.fetchall()
for i in rtt:
print("***********************************************")
print("Address:", i[4])
print("***********************************************")
def ad_login():
while True:
print("1. Add food")
print("5. Logout")
if ask == 1:
add_food()
elif ask == 2:
update_food()
elif ask == 3:
delete_food()
elif ask == 4:
view_orders()
elif ask == 5:
return
def ad_panel():
if pas == 'Zomato':
print("Access granted")
ad_login()
else:
print("Wrong Password")
admin()
def show_menu():
AD
DING FOOD OPTION FOR ADMIN :
UP
DATING FOOD :
DELETING FOOD :
VIE
W ORDERS :
AD
MIN LOGIN FUNCTION :
SH
OW MENU :
TABLE