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.
我正在尝试将一些数据插入到 pysqlite 数据库中,但即使代码运行良好且没有错误,数据库中也没有显示任何内容,并且我确保变量确实包含一个值
cur = self.con.execute("insert into urllist(url) values('%s')" % seed)
我已经仔细检查了表和列名,它们也是正确的
你在打电话 con.commit() 吗?
除非在关闭连接之前使用此方法,否则显然更改会丢失。
http://readthedocs.org/docs/pysqlite/en/latest/sqlite3.html