0
データベースに格納されている一部の製品の価格を比較しようとしていますが、比較がうまくいく間にupdateステートメントが目的のフィールドを更新していないようです。Python Sqlite3 Updateクエリが機能しない
for currentRow,newRow in zip(currentInfo,newInfo):
if currentRow[1]!=newRow[1]:
print(currentRow[0],newRow[0])
print("The price of %s has changed from %s to %s" % (currentRow[0], currentRow[1], newRow[1]))
db.execute("update table set Prices=? where Product=?",(newRow[1],currentRow[0]))
conn.commit
方法 'conn.commit()私は括弧を追加するのを忘れ...本当に恥ずかしい' – lmiguelvargasf
@lmiguelvargasfあるコミット。あなたの時間をありがとう – Volpym