Pages

Monday, September 16, 2013

How to Display MySQL Data in Drupal

On a Drupal website, you can display information from your MySQL database tables. For example, on a commerce site, you might have a unique ID for each customer transaction. You can pull the number from your MySQL database and display it on the page for the customer. To display MySQL data in Drupal, install the Table Wizard and Views modules.

Instructions

    1

    Go to Drupal.org and download the Table Wizard and View modules from their respective pages.

    2

    Extract the files in the modules and upload them to your site's "sites/all/modules" directory.

    3

    Log into your Drupal dashboard. Click "Administer," "Site Building" and "Modules."

    4

    Check the boxes next to "Table Wizard" and "Views." Click "Save Configuration." You can now use the "Views" module to display your MySQL data. The process is different depending on where on your Drupal site you want to display the data. The Views Help section has instructions for specific places. To do so anywhere else on your site, use the "views_embed_view()" function in your PHP source code.

0 comments:

Post a Comment