I have an update query which is returning an error, this is the code:
self.cur.execute("UPDATE Trainers SET Name=?, DOB=?, Gender=?",(Name, DOB, Gender))
This is the error:
sqlite3.OperationalError: near ",": syntax error
尝试使用花括号将对您有帮助。
self.cur.execute("UPDATE Trainers SET Name={}, DOB={}, Gender={}",(Name, DOB, Gender))
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.