擅长:python、mysql、java
<p><a href="http://www.python.org/dev/peps/pep-0249/#cursor-objects" rel="nofollow">spec</a>表示游标可以是只读的,或者您的数据库可能处于事务模式。我也不清楚为什么在使用<a href="http://www.python.org/dev/peps/pep-0249/#id15" rel="nofollow">execute</a>时没有在准备好的语句中指定参数,如<code>cursor.execute('insert into films values(?,?,?)', 'Annie Hall', '1977', 'Woody Allen')</code>。试试这些想法,我看不出你的代码中有任何错误,但我只是在建议最佳实践。你知道吗</p>