cvs: pear /MDB setup_test.php
| From: | Lukas Smith | Date: | Wed, 29 May 2002 14:30:32 +0000 |
| Subject: | cvs: pear /MDB setup_test.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4268@lists.php.net to get a copy of this message | ||
lsmith Wed May 29 10:30:32 2002 EDT
Modified files:
/pear/MDB setup_test.php
Log:
+ using original Metabase version again
+ changed includes
+ changed user/password
Index: pear/MDB/setup_test.php
diff -u pear/MDB/setup_test.php:1.2 pear/MDB/setup_test.php:1.3
--- pear/MDB/setup_test.php:1.2 Wed Apr 3 15:58:43 2002
+++ pear/MDB/setup_test.php Wed May 29 10:30:32 2002
@@ -1,51 +1,49 @@
-<?php
+<?
/*
* setup_test.php
*
- * @(#) $Header: /usr/repository/pear/MDB/setup_test.php,v 1.2 2002/04/03 20:58:43 lsmith Exp $
+ * @(#) $Header: /usr/repository/pear/MDB/setup_test.php,v 1.3 2002/05/29 14:30:32 lsmith Exp $
*
*/
- require("parser.php");
require("manager.php");
require("metabase_wrapper.php");
- require("xml_parser.php");
-function output($message)
+Function Output($message)
{
echo $message,"\n";
}
-function dump($output)
+Function Dump($output)
{
echo $output;
}
- $input_file = ($argc<2 ? "test.schema" : $argv[1]);
- $variables = array(
- "create" => "1"
+ $input_file=($argc<2 ? "test.schema" : $argv[1]);
+ $variables=array(
+ "create"=>"1"
);
- $arguments = array(
- "Type" => "mysql",
- "User" => "root",
- "Debug" => "Output"
+ $arguments=array(
+ "Type"=>"mysql",
+ "User"=>"metapear",
+ "Password"=>"funky",
+ "Debug"=>"Output"
);
- $manager = new MDB_manager;
- $manager->debug = "Output";
-
$success=$manager->updateDatabase($input_file,$input_file.".before",$arguments,$variables);
- if($success) {
- echo $manager->dumpDatabase(array(
+ $manager=new metabase_manager_class;
+ $manager->debug="Output";
+
$success=$manager->UpdateDatabase($input_file,$input_file.".before",$arguments,$variables);
+ if($success)
+ {
+ echo $manager->DumpDatabase(array(
"Output"=>"Dump",
"EndOfLine"=>"\n"
));
- } else {
- echo "Error: ".$manager->error."\n";
}
- if(count($manager->warnings) > 0) {
+ else
+ 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);
- }
+ if($manager->database)
+ echo MetabaseDebugOutput($manager->database);
-?>
+?>
\ No newline at end of file