Page 44 - Phyton_GUIprogrammingwithTkinter
P. 44
P a ge | 35
5. SELECT Operation
i. Create a new file named select.py, then fill it with the following code:
ii. Save the file.
iii. Click Run Run Module to compile the code.
iv. Open IDLE Shell and it will show all the data in database as the following.
v. Now, try it yourself to use fetchone() and fetchmany() method to display data
in databases.
6. UPDATE Operation
i. Create a new file named update.py. Then fill it with the following code:
i. In the code above, we assign a new value to the data with customer_id = 1.
Save the file.
ii. Click Run Run Module to compile the code.