Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
def update_rec():
    con = sqlite3.connect("customerRecord.db")
    cur = con.cursor()
    cur.execute('SELECT * FROM customerRecord')
    cur.execute('UPDATE customerRecord SET TotalPurchase = (?) WHERE TotalPurchase = (?) ')
    con.commit()


What I have tried:

def update():
    customerDatabase_BackEnd.update_rec()
Posted
Updated 3-Jan-20 17:47pm
Comments
Richard MacCutchan 31-Dec-19 4:04am    
What is the problem?

1 solution

Your code isn't setting the variables. It needs parameters to work

Why do a select * before an update?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900