pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1")
when I execute my program I get this problem if anyone can help please ,
def insert():
nomcomplet=entryName.get()
adresse=entryadr.get()
saison=entrySEM.get()
nombre_de_chambre=entryCHEM.get()
if nomcomplet == "" or adresse == "" or saison == "" or nombre_de_chambre == "" :
messagebox.showinfo("insert status","all field are requireds")
else :
con= pymysql.connect(host='localhost',port=3307,user="root" ,password="", db="miniprojet",local_infile=True)
cursor = con.cursor()
cursor.execute("insert into `moha` (nomcomplet,adresse,saison,nombre_de_chambre)")
cursor.execute("commit");
MessageBox.showinfo("insert status", "inserted successfully")
con.close();
that's the fonction of connection