AttributeError: 'sqlite3.Cursor' object has no attribute 'commit'

布满荆棘的人生 2021-12-11 07:17 405阅读 0赞

原本是这么写的:

conn = sqlite3.connect(‘fitkits.db’)

cursor = conn.cursor()

cursor.commit()

正确的写法:

conn = sqlite3.connect(‘fitkits.db’)

cursor = conn.cursor()

conn.commit()

发表评论

表情:
评论列表 (有 0 条评论,405人围观)

还没有评论,来说两句吧...

相关阅读