phpMyViews - Tutorial

At first ... the main script file "phpmyviews.php" in a folder somewhere on your webspace. Note the path to it.

...then put the config file "pmv_config.php" into your working folder, where you want to generate the data views. Adjust the path to the script file in the last lines of "pmv_config.php".

Run the script by typing the URL of your "pmv_config.php" script in your webbrowser.

Example 1 : Simple Data View

Here's a listing for a simple MySQL query and the corresponding output.

# MySQL Parameters
  if (
file_exists('pmv_db_config.php')) {

# Actions
$pmv['default'][0]['sql']='SELECT * FROM addresses ORDER BY surname';
$pmv['default'][0]['main']='<tr><td>$surname, $prename</td><td>$address</td><td>$telephone</td></tr>';

# execute phpMyViews

Let's have a closer look on this:

That's it. The script executes a MySQL query and, after printing a table header, shows all the entries of the query result and finally prints a table footer. Isn't it easy ?

Next page Logo