Loading...

Knowledge Base

Searching MySQL tables in phpMyAdmin

To search MySQL tables in phpMyAdmin:

 
  1. Log into the Manage MySQL tool.
  2. In the Current MySQL Databases section, click a login name for a database to log into phpMyAdmin.
  3. On the left side of the phpMyAdmin program window, click on the database in which the table resides.
  4. Click on the table to display the Structure page for the table.
  5. Click Search.
  6. Build a query or query by example:

    Build a query
     
    1. In the Select fields (at least one) field, select the fields you want to be displayed in the final results. The list includes all of the fields in the table.
    2. In the Display XX records per page field, enter a number if you want to limit the number of records displayed. The default is 30.
    3. In the Display order field, select a field and then indicate Ascending or Descending order, if you want to sort the results.
    4. In the Add search conditions field, enter any specific conditions for the search.
      Examples: field_name < 1, field_name = (1+2)*3.
      For more information, click the documentation icon to the right of the field name to go to the Functions and Operators chapter of the MySQL Manual.


Query by example
In the Do a 'query by example' (wildcard: '%') section, you can search for specific words or values in fields by entering the search criteria into the appropriate fields.
Entering data into a field will only bring up results with the exact data in the exact field. To broaden the search, you can add a wildcard symbol before and/or after the word you are searching for.
Example: Entering 'Smith' as the value will pull up any records with 'Smith' in that specific field. But entering '%Smith%' will pull up records that have any characters before or after 'Smith', such as 'John Smith' and 'Smithson'.

 
  1. Click Go to run the query and display the code and results.

Searching a MySQL database with phpMyAdmin

This tutorial teaches how to search through a MySQL database with phpMyAdmin.