<?
 
/************************************************************************/
 
/*                        METASCANNER SAMPLE                                */
 
/************************************************************************/
 
 
include ("metascanner.php");                            //Importing Class file
 
 
$metadata = new MetaScanner("localhost");                //Instantiating class MetaScanner with server specification as a parameter
 
$metadata->connect();                                    //Connects too the specified DataBase                            
 
 
 
/************************************************************************/
 
/*SAMPLE 1: SHOWS ALL MYSQL SERVER DATABASES AND RELATIVE INFORMATION   */
 
/************************************************************************/
 
 
$metadata->showAll();                                    //Shows all MySql server in a simple table style
 
 
 
/************************************************************************/
 
/*SAMPLE 2: SCAN THE ALL SERVER                                        */
 
/************************************************************************/
 
 
$metadata->scanAll();
 
 
 
/************************************************************************/
 
/*SAMPLE 3: PRINT ALL FIELDS OF A DETERMINED TABLE                        */
 
/************************************************************************/
 
/*Put a tabel name before uncomment those lines                            */
 
/************************************************************************/
 
 
/*$tempvalue = $metadata->returnfllist();                    
 
for($i=0;$i<mysql_num_fields($tempvalue["put_your_table_name_here"]);$i++) 
 
                    {
 
                    print("<tr>
 
                    <td width=\"33%\" align=\"center\">".mysql_field_name($tempvalue["put_your_table_name_here"],$i)."</td>
 
                    <td width=\"33%\" align=\"center\">".mysql_field_type($tempvalue["put_your_table_name_here"],$i)."</td>
 
                    <td width=\"34%\" align=\"center\">".mysql_field_len($tempvalue["put_your_table_name_here"],$i)."</td>
 
                      </tr>");
 
                    }*/
 
 
/************************************************************************/
 
/*SAMPLE 4: GETS TABLE LIST                                            */
 
/************************************************************************/
 
/*Put a database name before uncomment those lines                        */
 
/************************************************************************/
 
 
//$metadata->getTables("put_a_database_here");
 
 
/************************************************************************/
 
/*SAMPLE 5: GETS DATABASE LIST                                            */
 
/************************************************************************/
 
 
$metadata->getDataBases();
 
 
/************************************************************************/
 
/*SAMPLE 6: DISCONNECT                                                  */
 
/************************************************************************/
 
 
$metadata->disconnect();
 
?>
 
 |