Updating records

To update the phone number of an existing contact, we use the following code:

query = 'UPDATE contacts SET contactnumber=? WHERE contactnumber=? AND name=?'parameters = (newphone, old_phone_number, name)self.execute_db_query(query, parameters)

Get Tkinter GUI Application Development Blueprints - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.