我的环境:
我正在努力在sqlite3数据库中保存一个引用
import sqlite3
class Database:
def __init__(self):
self.dbpath = 'db.sqlite3'
self.conn = sqlite3.connect(self.dbpath)
self.c = self.conn.cursor()
db = Database()
def update_comment(name, comment='null'):
db.c.execute('update twitter_users set comment = ? where name = ?', (comment, name))
db.conn.commit()
update_comment('Jikkenndesu', "How's day?")
但是如果我执行select * from twitter_users;
,它就会输出Jikkenndesu|Hows day?
。一句话就不提了
如何解决这个问题? `你知道吗
我用密码破解了这个问题:
相关问题 更多 >
编程相关推荐