Page 56 - PYTHON-12
P. 56
FOOD ORDERING SYSTEM
PROGRAM
import os
import platform
import mysql.connector
mydb=mysql.connector. Connect(host="localhost", user="root",
passwd ="",database="food")
mycursor=mydb.cursor()
def Customer():
L=[]
c_id=int(input("Enter the Customer ID: "))
L.append(c_id)
name=input("Enter the Customer Name: ")
L.append(name)
cphone=input("Enter Customer Phone Number : ")
L.append(cphone)
payment=int(input("Enter Payment Method ((1)Credit Card/(2)Debit Card:) "))
L.append(payment)
pstatus=input("Enter the Payment Status : ")
L.append(pstatus)
email=input("Enter the Email ID:")
L.append(email)
OrderF_id=int(input("Enter the Order Food ID:"))
L.append(OrderF_id)
date=input("Enter the Date: ")
L.append(date)
cust=(L)
sql="insert into customer
(c_id,name,cphone,payment,pstatus,email,OrderF_id,date) values
(%s,%s,%s,%s,%s,%s,%s,%s)"
mycursor.execute(sql,cust)
mydb.commit()
def Employee():
L=[]