Our database table EMPLOYEE looks like this:
You can display ALL the entries of your table below:
The fechall() will actually read all the records from your table. Using the loop, each of the record will be displayed. The row, for instance, acts as the variable to hold the value of the first field(using our table above, First_Name), and row will be be for our field Last_Name.
Don't forget that the Python code above is a function. If you don't have a main menu, then, simply call this module by typing, read( ), in your main code.
To search and display a specific record from the table, your Python code should be like this. You can double click to enlarge the photo.
Now, try this on other tables you have!