This tutorial will teach you how Insert the Records using Python and mysql. Establish the database connection. from tkinter import * from tkinter import messagebox import mysql.connector def Ok(): studname = e1.get() coursename = e2.get() feee = e3.get() mysqldb=mysql.connector.connect(host="localhost",user="root",password="",database="smschool") mycursor=mysqldb.cursor() try: sql = "INSERT INTO record (id,stname,course,fee) VALUES (%s, %s, %s, %s)" val = ("",studname,coursename,feee) mycursor.execute(sql, val) mysqldb.commit() messagebox.showinfo("information", …
Insert Records using Python tkinter mysql


