I tried deleting a record inside of python for my database DB and it gave me error,
mysql.connector.errors.ProgrammingError: 1370 (42000): execute command denied to user 'user'@'%' for routine 'e7.get'
e7.get is the input from an entry box in tkinter and i tried the same command in mysql workbench,
DELETE FROM PATIENTS WHERE Patient_name=random_name
and it worked inside of mysql workbench, only problem is when i use the variable, and some privillage error? im using a online free hosting website db4free.net . I have tried grant privilage and it gives another error that #1044 - Access denied for user 'user'@'%' to database 'DB'
Server does support remote access. Thanks in advance :)
EDIT : I TRIED PUTTING e7.get() in quotes and it dint give the error but it did nothing and the record still exists.
CODE:
def delete():
con = mysql.connect(host='localhost', user='user', password='*****', database='DB')
c = con.cursor()
c.execute("DELETE FROM PATIENTS WHERE gender = 'e7.get()' ")
c.execute('commit')
con.close()
e7.delete(0, END)
gives no error but does not delete the record.