Page 15 - project IP DEEPAK Full for youtub
P. 15

***Event coding:-***










               import mysql.connector as sqltor

               import pandas as pd


               mydb=sqltor.connect(host="localhost",user="root",passwd="gast251

               5")

               mycursor=mydb.cursor()


               cursor=mydb.cursor()

               i=1


               while i==1:


                   print('====Main Menu====')

                   print('[1]DataBase setup')


                   print('[2]continue')


                   a=int(input(':'))

                   if a==1:


                       mycursor.execute('create database if not exists fddel')


                       mycursor.execute('use fddel')

                       mycursor.execute('create table if not exists foodmenu(\


                                                                             food_id int(3) primary key,\

                                                                             food_name varchar(10),\


                                                                             food_price int(4))')


                       mycursor.execute("create table if not exists
               custdet(customer_name varchar(20),\
   10   11   12   13   14   15   16   17   18   19   20