Pymysql中插入json内容 dict‘ object has no attribute ‘translate‘
最近在使用pymysql插入数据时,会出现以下报错
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 \'det":
和
dict' object has no attribute 'translate'
最后发现是单双引号造成的问题,所以我们应该使用以下方法:
aa = pymysql
原创
2020-10-23 18:03:07 ·
1214 阅读 ·
0 评论