【发布时间】:2019-09-28 17:24:03
【问题描述】:
我收到此代码错误。编程错误是语句中并未使用所有参数。我认为这是关于更新声明,但我不知道真正的问题是什么
定义编辑配置文件():
username1 = username_verify.get()
password1 = password_verify.get()
full_name1 = full_name_verify.get()
faculty1 = c.get()
position1 = position_verify.get()
email1 = email_verify.get()
room_no1 = room_no_verify.get()
if full_name1 == "" and faculty1 == "" and position1 == "" and email == "" and room_no1 == "":
Label(text="").pack()
time.sleep(1)
Label(text="Please complete your profile", fg="red", width=50).place(x=250,y=380)
else:
profile_upd = "UPDATE profile SET Faculty = %s AND Position = %s AND Email = %s AND Room_NO = %s WHERE username =%s"
user1 = (full_name1, faculty1, position1, email1, room_no1,username1)
mycursor.execute(profile_upd, user1)
mydb.commit()
Label(text ="CHANGES SAVED SUCCESFULLY!!", fg = "green",width=50).place(x=250,y=380)
【问题讨论】: