You are on page 1of 7

SOURCE CODE (main food program.

py)

import mysql.connector as sql

conn=sql.connect(host="localhost", user="root",

passwd="manager", database="food")

if conn.is_connected():

print("sucessfully connected")

print("ORDER YOUR FOOD HERE")

c1=conn.cursor()

print("1.CREATE YOUR ACCOUNT")

print("2.ORDER FOOD")

print("3.LOG IN")

print("4.EXIT")

choice=int(input("enter your choice:"))

if choice ==1:

v_cust_name=input("enter your name:")

v_account_no=int(input("enter your own account number:"))

v_SQL_insert="insert into myc

values('"+v_cust_name+"',"+str(v_account_no)+")"

c1.execute(v_SQL_insert)

conn.commit()

print("account created")

1
if choice==2:

v_f_name=input("enter the name of food:")

v_price=int(input("enter the cost of your food:"))

v_address=input("enter your address:")

v_SQL_insert="insert into sales values('"+

v_f_name+"',"+str(v_price)+",'"+v_address+"')"

c1.execute(v_SQL_insert)

conn.commit()

print("sucessfully phased")

if choice==4:

print("THANK YOU FOR VISITING")

if choice==3:

print('')

print('TO LOGIN FILL THIS DETAILS')

print('')

cust_name=input('enter your name')

print('')

v_account_no=int(input('enter your accont no'))

c1=conn.cursor()

c1.execute('select * from myc')

data=c1.fetchall()

count=c1.rowcount

for row in data:

if (cust_name in row) and (v_account_no in row):

print(' ')

2
print(' ')

print('WELCOME TO YOUR FOOD SERVICE')

print(' ')

print(' ')

print('TO SEE CUSTMER DETAILS PRESS :1 ')

print(' ')

print(' TO UPDATE DETAILS PRESS :2 ')

print(' ')

print(' TO EXIT PRESS :3')

print(' ')

print('TO SEE ORDERED FOOD:4 ')

print(' ')

c2=int(input('enter your choice'))

if (c2==1):

c1=conn.cursor()

c1.execute('select * from myc')

data=c1.fetchall()

count=c1.rowcount

print('total custmer is',count)

for row in data:

print(row)

print("VISIT AGAIN")

elif (c2==2):

print('')

print('TO UPDATE FILL THIS')

print('')

3
v_cust_name=input('enter name :')

print('')

v_acount_no=int(input("enteraccount number:"))

c1=conn.cursor()

#c1.execute('create table

myc('"+v_cust_name+"',"+str(v_account_no)+")"

update_dtails="insert into myc

values('"+v_cust_name+"',"+str(v_account_no)+")"

c1.execute(update_dtails)

conn.commit()

print('costumer details succesully updated')

elif (c2==3):

print('THANK YOU FOR VISITING')

elif(c2==4):

c1=conn.cursor()

c1.execute('select * from sales')

data=c1.fetchall()

count=c1.rowcount

print('total order food is',count)

for row in data:

print(row)

print("VISIT AGAIN")

else:

print('SORRY SOMETHING WENT WRONG')

4
OUTPUT

5
HARDWARE AND SOFTWARE REQUIREMENTS

I.OPERATING SYSTEM : WINDOWS 7 AND ABOVE

II. PROCESSOR : PENTIUM(ANY) OR AMD

ATHALON(3800+- 4200+ DUAL CORE)

III. MOTHERBOARD : 1.845 OR 915,995 FOR PENTIUM 0R MSI

K9MM-V VIA K8M800+8237R PLUS

CHIPSET FOR AMD ATHALON

IV. RAM : 512MB+

V. Hard disk : SATA 40 GB OR ABOVE

VI. CD/DVD r/w multi drive combo: (If back up required)

VII. FLOPPY DRIVE 1.44 MB : (If Backup required)

VIII. MONITOR 14.1 or 15 -17 inch

IX. Key board and mouse

X. Printer : (if print is required – [Hard copy])

SOFTWARE REQUIREMENTS:

I. Windows OS
II. Python

6
BIBLIOGRAPH
Computer science With Python - Class XI By : Sumita Arora
1. A Project Report On Food Order Processing Management System
(BBMS)
By : Praveen M Jigajinni
2. Website: https://www.w3resource.com

***

You might also like