my_cur=conn.cursor()
my_cur.execute("update customer set 'name=%s','address=%s','id proof type=%s','id no=%s','gender=%s','state=%s','pincode=%s','mobile=%s','email=%s','nationality=%s' where 'ref=%s'",(
self.var_name.get(),
self.var_addr.get(),
self.var_id_proof.get(),
self.var_id_no.get(),
self.var_gender.get(),
self.var_state.get(),
self.var_pin.get(),
self.var_mob.get(),
self.var_email.get(),
self.var_natio.get(),
self.var.get()
))
conn.commit()
self.fetch_data()
conn.close()
#mysql.connector.errors.ProgrammingError: 1064 (42000): 你的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在 ''name='Sahil'','address='Panchwad'','id proof type='Adhar Card'','id no=' 附近使用正确的语法123456'' 在第 1 行