Python
Python Online Certification ›
Compiler
main.py Save Run Shell Clear
1 def delete_record_func(): >
2 entered_rowid = delete_record_entry.get()
3 conn = mysql.connector.connect(host = "localhost",
password = 'Saraswathi',user= 'root',database =
'bloodbank')
4 c = conn.cursor()
5 c.execute("DELETE FROM donar_table WHERE rowid = ?"
,entered_rowid)
6 conn.commit()
7 adminlogin_window_data.destroy()
8 response6 = messagebox.showinfo("DELETED","RECORD
DELETED")