我正在使用 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)”行并表示该行是错误