sqlite3.OperationalError:near“ =”:Python语法错误

时间:2019-03-02 02:15:31

标签: python sqlite

这是我的代码:

 cursor.execute("UPDATE students SET (firstName = %s, lastName = %s, birthDate = %s, studentMark = %s) WHERE id = %s" % (firstName, lastName, birthDate, studentMark, findStudent))

这是错误消息:

Traceback (most recent call last):
  File "C:\Users\ahmed\Desktop\Coursework\main.py", line 102, in <module>
    cursor.execute("UPDATE students SET (firstName = %s, lastName = %s, birthDate = %s, studentMark = %s) WHERE id = %s" % (firstName, lastName, birthDate, studentMark, findStudent))
sqlite3.OperationalError: near "=": syntax error

您能帮我解决这个问题吗:D谢谢

0 个答案:

没有答案