Login   Register  
PHP Classes
elePHPant
Icontem

File: setup_currency_database.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Manuel Lemos  >  Query result table display class  >  setup_currency_database.php  >  Download  
File: setup_currency_database.php
Role: Auxiliary script
Content type: text/plain
Description: Script to setup the example currencies database
Class: Query result table display class
Outputs tables with the result of database queries
Author: By
Last change: Removed argument passing by reference.
Date: 2008-06-08 15:50
Size: 880 bytes
 

Contents

Class file image Download
<?
/*
 * setup_currencies_database.php
 *
 * @(#) $Id: setup_currency_database.php,v 1.2 2008/06/08 22:32:03 mlemos Exp $
 *
 */

    
require("metabase/metabase_parser.php");
    require(
"metabase/metabase_manager.php");
    require(
"metabase/metabase_database.php");
    require(
"metabase/metabase_interface.php");
    require(
"metabase/xml_parser.php");

Function 
Output($message)
{
    echo 
$message,"\n";
}

Function 
Dump($output)
{
    echo 
$output;
}

    
$input_file=($argc<"currencies.schema" $argv[1]);
    require(
"database_setup.php");

    
$manager=new metabase_manager_class;
    if(!
$manager->UpdateDatabase($input_file$input_file.".before"$database_arguments$schema_variables))
        echo 
"Error: ".$manager->error."\n";
    if(
count($manager->warnings)>0)
        echo 
"WARNING:\n",implode($manager->warnings,"!\n"),"\n";
    if(
$manager->database)
        echo 
MetabaseDebugOutput($manager->database);

?>