Problem code:
MySQLdb._exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to you
r MySQL server version for the right syntax to use near 'read,mention) values ('家长偏心对孩子的影响有多大',15424499,5655)'
at line 1")
First analyze the error message: MySQLdb._exceptions.ProgrammingError is because the connecting party did not respond correctly after a period of time or the connected host did not respond, and the connection attempt failed.
So I first checked the sql statement, and when I ran my sql statement in Navicat, I found:
Obviously, the read inside is the keyword index, and an error is reported.
Solution: change the key value in items to something else.