1
liprais 2014-12-24 17:56:02 +08:00
报错信息是啥......你这样问问题问一半就是想帮你都帮不了啊.....
|
2
jookr OP @liprais 报错信息如下
Traceback (most recent call last): File "E:\python\tt.py", line 21, in <module> cursor.execute(query); File "D:\Python27\lib\site-packages\MySQLdb\cursors.py", line 202, in execute self.errorhandler(self, exc, value) File "D:\Python27\lib\site-packages\MySQLdb\connections.py", line 36, in defau lterrorhandler raise errorclass, errorvalue _mysql_exceptions.ProgrammingError: (2014, "Commands out of sync; you can't run this command now") |
3
lixia625 2014-12-24 18:49:37 +08:00
要每次cursor close?
|
4
lcqtdwj 2014-12-24 19:18:33 +08:00
commit去掉试试,默认是自动提交,不需要你手动commit
|