插入查询提供了不支持的类型错误
def insert_history(self, time, date, url):
db = sqlite3.connect('/home/amol/BE_project/Browser.db')
cursor = db.cursor()
params = (url, time, date)
cursor.execute("INSERT INTO history(url, time, DATE) values(?, ?, ?)",params)
db.commit()
收到以下错误:
cursor.execute(“INSERT INTO history(url,time,DATE)”值(?,?, ?)“,params)sqlite3.InterfaceError:错误绑定参数1 - 可能是不受支持的类型。
架构是:
sqlite> .schema history
CREATE TABLE history(id INTEGER PRIMARY KEY AUTOINCREMENT, url TEXT , time text, DATE text );
先谢谢