Hello I've been attempting to fix an issue with a python OperationalError in a sqlite3 database. I am using a question mark as a placeholder for an insert statement. But I am getting the following message.
db.execute("UPDATE accounts SET balance = ? WHERE (name = ?);", (new_balance, self.name))
db.execute("INSERT INTO history VALUES(?, ?, ?, ?);", (deposit_time, self.name, amount, picked_zone))
sqlite3.OperationalError: table history has 3 columns but 4 values were supplied.
I looked over the code and tried removing one of the items in the brackets to the right. I get the same message.
I verified the syntax of an insert statement. I've looked up some solutions that I have tried but they did not work with my version. Like the following.
sql = ''' INSERT INTO tasks(name,priority,status_id,project_id,begin_date,end_date)
VALUES(?,?,?,?,?,?) '''
I reversed the values parameter. It didn't work. I tried using triple quotes. That did not work. I'm not sure how to fix this.[enter image description here](https://i.stack.imgur.com/PEOfC.png)