PHP Classes

File: ez_demo.php

Recommend this page to a friend!
  Classes of Justin Vincent   ezSQL   ez_demo.php   Download  
File: ez_demo.php
Role: Example script
Content type: text/plain
Description: Demo that maps out your db schema
Class: ezSQL
Makes using mySQL ridiculously easy (great docs)
Author: By
Last change:
Date: 21 years ago
Size: 468 bytes
 

Contents

Class file image Download
<?php

   
// Include ezSQL in order to use it..
   
include_once "ez_sql.php";

   
// Get list of tables from current database..
   
$my_tables = $db->get_results("SHOW TABLES",ARRAY_N);

   
// Print out last query and results..
   
$db->debug();
   
   
// Loop through each row of results..
   
foreach ( $my_tables as $table )
    {
       
// Get results of DESC table..
       
$db->get_results("DESC $table[0]");
       
       
// Print out last query and results..
       
$db->debug();
    }
   
?>