就是插入文章数据的时候,可能是因为有标签的缘故出现这样的问题,如图:
pymysql.err.ProgrammingError: (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'q</p>\n <p id="_j_p...
该怎么解决?修改字段类型?谢谢了
PHP中文网2017-04-18 10:26:52
You have to use it
sql = " insert into t_a (a,b,c) values (%s, %s,%s)"
db.execute(sql, a, b,c)
Way
I guess you use it
sql = " insert into t_a (a,b,c) values (%s, %s,%s)" % (a,b,c)
db.execute(sql)
伊谢尔伦2017-04-18 10:26:52
It may be that the field uses "keywords". Check it and change the length to be larger.