Loading...

Knowledge Base

Querying MySQL databases using phpMyAdmin

Here are the steps to run a query in a MySQL database using phpMyAdmin.

  1. Log in to your Account Manager.
  2. On the left pane, click on Hosting.

    Hosting tab

  3. Search for the hosting plan where your database is, and then click its Manage button.

    Hosting - Manage

  4. Click MySQL Management in the left-hand menu.

    MySQL Management

  5. Locate the database you need to manage, then click its Manage link on the right.

    Manage database

  6. Look for your database username and click the phpMyAdmin link next to it.

    MySQL Management - phpMyAdmin link

  7. You will be redirected to phpMyAdmin. Click on the database name on the left.

    Database name width=

  8. Click on the Query option listed on the top section of the phpMyAdmin page.

    phpMyAdmin - Query

  9. To build your query, specify your criteria using the fields below.
    • Field: Select the table fields that you want to query. Tables and fields are displayed with the name of the table, a period, and then the name of the field.
    • Sort: Select whether you want the results to be sorted in descending order (top to bottom) or ascending order (bottom to top).
    • Show: Select this checkbox if you are selecting fields and want to have them displayed.
    • Criteria: Enter your search criteria. For example, if you entered '3' without the double quotes, your query would basically read 'find all of the records where the field I selected is greater than 3'.
    • And/Or: If you want to enter another search criteria, select whether you want the selected records to match both or either criterion and then enter the string into the text box. You can select 'And' or 'Or' for two different search criteria within the same field and also when searching for more than one field at a time.
    • Ins & Del Checkboxes: Select the Ins checkbox next to a criteria row or under a field column to add another option. Select the Del checkbox next to a criteria row or under a field column to remove an option.
    • Add/Delete Criteria Row: Select the number of criteria rows to add (positive number) or delete (negative number). This option is similar to the Ins and Del checkboxes for the criteria rows, except that you are able to add or remove more than one option at a time.
    • Add/Delete Field Columns Select the number of field columns to add (positive number) or delete (negative number). This is similar to the Ins and Del checkboxes for the field columns, except that you can add or remove more than one option at a time.
    • Use Tables: Select the tables to query. Selected tables will affect the values in the Field field.
  10. Once done, scroll down the bottom page, where you can:
    • Click the Update Query button for the query to take effect as you make the changes. The query will be written out in the SQL query on the database field. 
    • Click the Submit Query button to run the query. The page displays the query code and results.

      phpMyAdmin - Query

Did you find this article helpful?

 
* Your feedback is too short

Loading...