Page 43 - Phyton_GUIprogrammingwithTkinter
P. 43

P a ge  | 34


                   4.  INSERT Operation

                         i.   Create a new file named insert_data.py, then fill it with the following code.
























                        ii.   Then, we also must include mydb.commit () to save the data. This method is
                              usually called when inserting data, updating data, and deleting data.
                        iii.   Save the file.
                        iv.   Click Run  Run Module to compile the code.
                         v.   Open IDLE Shell and it will show as the following when the data is successfully
                              added.












                        vi.   We can add multiple data at one time by do a looping based on the following
                              code.
   38   39   40   41   42   43   44   45   46   47   48