Skip to Main Content
Python GUI Programming Cookbook
book

Python GUI Programming Cookbook

by Burkhard Meier
December 2015
Beginner to intermediate content levelBeginner to intermediate
350 pages
6h 49m
English
Packt Publishing
Content preview from Python GUI Programming Cookbook

Using the SQL UPDATE command

This recipe will use the code from the previous recipe, explain it in more detail, and then extend the code to update our data.

In order to update data we have previously inserted into our MySQL database tables, we use the SQL UPDATE command.

Getting ready

This recipe builds on the previous recipe, so read and study the previous recipe in order to follow the coding in this recipe where we modify existing data.

How to do it…

First, we will display the data to be modified by running the following Python to MySQL command:

import mysql.connector as mysql import GuiDBConfig as guiConf class MySQL(): # class variable GUIDB = 'GuiDB' #------------------------------------------------------ def showData(self): # connect to MySQL ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python GUI Programming - A Complete Reference Guide

Python GUI Programming - A Complete Reference Guide

Alan D. Moore, B. M. Harwani
Python Network Programming Cookbook - Second Edition

Python Network Programming Cookbook - Second Edition

Pradeeban Kathiravelu, Dr. M. O. Faruque Sarker

Publisher Resources

ISBN: 9781785283758Supplemental Content