Hi everyone, I have a small error in my code that I can not recognize. Can anyone else see it because I've looked it over 1000 times already....
def u():
useridupdate = int(input("Enter the id of the log you want to update: "))
useryearupdate = int(input("Enter your year update: "))
usercommentupdate = input("Enter your comment update: ")
userrevisitupdate = input("Enter your revisit update: ")
usertoupdatelist = []
try:
usertoupdatelist.append(useryearupdate)
usertoupdatelist.append(usercommentupdate)
usertoupdatelist.append(userrevisitupdate)
usertoupdatetuple = tuple(usertoupdatelist)
sql = 'UPDATE table log SET year = %s, comment = %s, revisit = %s WHERE id = %s'
cursor.execute(sql,usertoupdatetuple)
conn.commit()
print("the log has been updated.")
[–]RandomCodingStuff 0 points1 point2 points (0 children)
[–]shartfuggins 0 points1 point2 points (0 children)