Searching a database table for specific information
In this recipe, we will be learning how searching is performed in a database table to fetch the desired information. We assume that a user has forgotten their password. So, you will be prompted to enter the database name, table name, and email address of the user whose password is required. If any user with the email address supplied exists in the database table, then the password of that user will be searched for, accessed, and displayed on the screen.
How to do it…
Follow these steps to find out how data can be searched for in a database table in SQLite:
- Let's create an application based on the
Dialog without Buttonstemplate. - Add five
QLabelwidgets, fourQLineEditwidgets, and oneÂQPushButtonwidget to the form by dragging and dropping fiveLabelwidgets, fourLine Editwidgets, and oneÂPush Buttonwidget on the form. - Set the
textproperty of the first threeLabelwidgets toEnter database name,Enter table name, andEmail Address. - Delete...