Performing a MySQL Query

MySQL SELECT queries can be run to lookup data held in the iEnterprise Mobile™ database using the Show Db menu option. Queries can only be run to view data on the iEnterprise Mobile™ server, Data cannot be changed or delete using MySQL queries from within the application. You can enter a query command directly or select module and field names from a list to build simple queries.

To enter MySQL queries:

  1. Select Utility in the Navigation Menu on the left of the page.
  2. Select Show Db in the Navigation Menu.
  3. You will be prompted to enter your MySQL username and password

NOTE: These login details are different from the standard administrator username and password. Access to this section of the Admin application is granted during installation of the iEnterprise Mobile server or by running the iEnterprise Mobile Installer.

If you know the MySQL query command needed, you can enter it using the following procedure:

  1. In the right hand box, enter your query command and click on Fetch from the action bar above.
  2. A list of records that match the query will be displayed below.
  3. If you would like to view a list of fields available within a table to create a simple query, use the following procedure:
    1. From the Show Db menu, select the table name from the drop down list in the action bar.
    2. A list of fields contained within the module is automatically displayed in the left handfield.
    3. A simple query has been created in the Schema name box, which would fetch all fields from the iEnterprise Mobile database for the chosen module.
  4. Scroll through the list of fields, and you can select, cut and paste field names.
  5. To look up contents of a particular field:
  6. Replace the * in the Schema name field with a field copied from Fields of CRM_CONTACTS box.
  7. MySQL query arguments can be added in the Schema name box.
  8. Click on Fetch to return results.
  9. You can save a Query for future use by clicking the Save action in the action bar.
    1. You can use or delete the saved search by clicking the Saved Queries button. 

You can download the resulting data for use elsewhere, by clicking Download in the action bar.

You can generate a query across multiple tables by using the Generate action from the action bar, this will allow you to select multiple tables, and double clicking on the field will add prepend the table name to the field name.