Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 mysqldb 连接到本地主机中的数据库。
它可以工作,但是如果我在程序运行时将数据添加到数据库中的表中,则显示已添加,但是当我从 localhost 检查表时,它尚未更新。
if your table uses innodb engine, you should call connection.commit() on every cursor.execute().
connection.commit()
cursor.execute()