O'Reilly logo

Tkinter GUI Application Development Blueprints - Second Edition by Bhaskar Chaudhary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a new record

A new record needs to be created every time a user enters a new name and a phone number in the entry widgets provided, and then clicks on the Add Record button. 

The database query for adding a new record is as follows:

query = 'INSERT INTO contacts VALUES(NULL,?, ?)'parameters = (self.namefield.get(), self.numfield.get())self.execute_db_query(query, parameters)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required