小编Dim*_*try的帖子

sqlite3.OperationalError: close "t": 语法错误是什么意思

我正在使用 python 并尝试使用更新行

db=sqlite3.connect('db')
cursor=db.execute('select * from infos where is_processed=0')
films=cursor.fetchall()
cursor.close()
db.close()
for film in films:
    inputLayer=np.array([film[1],film[2],film[3]],dtype=float)
    name=film[0]
    #print inputLayer
    NeuralNetwork3.nn(inputLayer,film[4])
    sql="update infos set is_processed=1 where file_name='"+name+"'"
    db = sqlite3.connect('db')
    db.execute(sql)
    db.commit()
    db.close()
Run Code Online (Sandbox Code Playgroud)

我得到:sqlite3.OperationalError:靠近“t”:语法错误出了什么问题?注意它指向“db.excute(sql)”行并表示该行是错误

python sqlite

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

python ×1

sqlite ×1