なぜこれが機能しないのか、私にはよくわかりません。ループの任意の部分を実行しようとすると、sqlite3.OperationalError: near "WHERE": 構文エラーが発生します。
con = sqlite3.connect('DatabaseName.sql')
cur = con.cursor()
if changes == "1":
Fname = input("Enter new first name: ")
Lname = input("Enter the last name of the person whom first name you wish to change: ")
cur.execute("""UPDATE Contacts SET Fname WHERE Lname""")
con.commit()
elif changes == "2":
Lname = input("Enter new last name: ")
Fname = input("Enter the first name of the person whom last name you wish to change: ")
cur.execute("UPDATE Contacts SET Lname WHERE Fname")
con.commit()
elif changes == "3":
Phone = input("Enter new telephone number(no dashes or spaces): ")
Fname = input("Enter the first name of the person whom telephone number you wish to change: ")
Lname = input("Enter the last name of the person whom telephone number you wish to change: ")
Phone = int(Phone)
cur.execute("""UPDATE Contacts SET Phone WHERE Fname AND Lname""")
con.commit()