May-18-2020, 03:17 AM
I'm trying to update a sqlite database and I get the following error: sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 4 supplied. I don't understand where I'm going wrong. The code is below:
conn = sqlite3.connect('financial.db')
c = conn.cursor()
c.execute("SELECT * FROM totals")
records = c.fetchall()
for record in records:
if record[0] ==arrivale.get():
t = ratee.get()
c.execute("UPDATE totals SET rent = ? ", (t))
c.fetchall()
