CS Project
CS Project
XXXXXXXXXXXXXXXXX
-------------------------------------
XXXXXXXXXXXXXXXXX
-------------------------------------
PYTHON SOURCE
CODE
-------------------------------------
XXXXXXXXXXXXXXXXX
-------------------------------------
XXXXXXXXXXXXXXXXX
-------------------------------------
import mysql.connector as pro
d=pro.connect(host="localhost",user="root",password="
admin",database="food")
e=d.cursor()
d=pro.connect(host="localhost",user="root",password="
admin",database="food")
e=d.cursor()
ser=int(input("Enter the Food ID:"))
fi=input("Enter the Food name:")
fp=int(input("Enter the Price of Food:"))
ft=input("Enter the Food Type:")
e.execute("insert into item values
({},'{}',{},'{}')".format(ser,fi,fp,ft))
print("NEW FOOD ADDED SUCCESSFULLY")
d.commit()
d=pro.connect(host="localhost",user="root",password="
admin",database="food")
e=d.cursor()
fidd=int(input("Enter the Food ID you want to delete
:"))
e.execute("delete from item where
S_no={}".format(fidd))
print("YOU HAVE DELETED A FOOD ITEM
SUCCESSFULLY")
d.commit()
d=pro.connect(host="localhost",user="root",password="
admin",database="food")
e=d.cursor()
fgg=("select * from orders")
print("Details of all orders are:")
e.execute(fgg)
rtt=e.fetchall()
for i in rtt:
print("********************************************
*********")
print("Food name:",i[0])
print("Food price:",i[1])
print("Total price:",i[2])
print("Phone NO:",i[3])
print("Address:",i[4])
print("********************************************
**********")
# HOME PAGE
def admin():
while True:
print("********************************************
**")
print("WELCOME TO FOOD PORTAL")
print("1. Admin Login")
print("2. Customer Login")
print("3. EXIT")
op=int(input("Enter option :"))
if op==1:
ad_panel()
elif op==2:
main_menu()
elif op==3:
break
admin()
-------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxx
-------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxx
-------------------------------------
MySQL Database
-------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxx
-------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxx
-------------------------------------
FOOD ITEM TABLE:
Food Order Table:
Feedback Table:
-------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxx
-------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxx
-------------------------------------
OUTPUTS
-------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxx
-------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxx
-------------------------------------
FOOD PORTAL MAIN PAGE:
FEEDBACK OF CUSTOMER:
PERSONAL ORDER HISTORY OF CUSTOMER: