So i need to update data in a database but im getting an error i dont understand. What i have is this
def update_account_balance(db, number, account, change):
con = sqlite3.connect(db)
cur = con.cursor()
cur.execute('UPDATE Accounts SET (?) = (?) WHERE Number == (?)', [account, change, number])
and what im getting is:
Traceback (most recent call last):
Python Shell, prompt 2, line 1
File "/Users/aharonsnyder1/Desktop/assignment 2/banking.py", line 168, in <module>
cur.execute('UPDATE Accounts SET (?) = (?) WHERE Number == (?)', [account, change, number])
sqlite3.OperationalError: near "(": syntax error
I am not sure what it is not liking.