$uttrekk_db_user = $uttrekk_db_ini_array['uttrekk_db_user']; $uttrekk_db_pswd = $uttrekk_db_ini_array['uttrekk_db_pswd']; $uttrekk_db_database = $uttrekk_db_ini_array['uttrekk_db_database']; print_r($uttrekk_db_ini_array); print_r($src_db_ini_array); print_r($table_names); echo "\n"; $uttrekkMySQLBase = null; $extractor = null; $uttrekkDirectory = "./uttrekksfiler"; $noarkIHoutputDir = "./"; // Main program starts here $uttrekkMySQLBase = null; try { $srcBase = new SrcBase($src_db_host, $src_db_port, $src_db_name, $src_db_user, $src_db_pswd, $src_db_sid); $uttrekkMySQLBase = new UtrekkMySQLBase($uttrekk_db_host, $uttrekk_db_user, $uttrekk_db_pswd, $uttrekk_db_database); } catch (Exception $e) { echo $e->getMessage(); } if ($srcBase == null) { echo "Problem med kobling til kildebasen\n"; return; } if ($uttrekkMySQLBase == null) { echo "Problem med kobling til Uttrekksbasen\n"; return; } $databaseParameters = new MySQLDBParameters($uttrekk_db_host, 3306, $uttrekk_db_database, $uttrekk_db_user, $uttrekk_db_pswd); $extractor = new Extractor("mysql", $databaseParameters, $uttrekkDirectory); $extractor->deleteDirectoryAndContents(); $extractor->createDirectory();
$uttrekk_db_user = $uttrekk_db_ini_array['uttrekk_db_user']; $uttrekk_db_pswd = $uttrekk_db_ini_array['uttrekk_db_pswd']; $uttrekk_db_database = $uttrekk_db_ini_array['uttrekk_db_database']; print_r($uttrekk_db_ini_array); print_r($src_db_ini_array); print_r($table_names); echo "\n"; $uttrekkMySQLBase = null; $extractor = null; $uttrekkDirectory = "./uttrekksfiler"; $noarkIHoutputDir = "./"; // Main program starts here $uttrekkMySQLBase = null; try { // $srcBase = new SrcBase($src_db_host, $src_db_port, $src_db_name, $src_db_user, $src_db_pswd, $src_db_sid); $uttrekkMySQLBase = new UtrekkMySQLBase($uttrekk_db_host, $uttrekk_db_user, $uttrekk_db_pswd, $uttrekk_db_database); } catch (Exception $e) { echo $e->getMessage(); } if ($uttrekkMySQLBase == null) { echo "Problem med kobling til Uttrekksbasen\n"; return; } $databaseParameters = new MySQLDBParameters($uttrekk_db_host, 3306, $uttrekk_db_database, $uttrekk_db_user, $uttrekk_db_pswd); $extractor = new Extractor("mysql", $databaseParameters, $uttrekkDirectory); $extractor->deleteDirectoryAndContents(); $extractor->createDirectory(); $logDir = $extractor->getLogDir(); $logger = new Logger($logDir, false, false, true); echo "\nSlettet gamle filer (hvis de eksisterte) og oppretter mappe for uttrekk ({$uttrekkDirectory}) \n"; //$noark4DatabaseStruktur = new Noark4DatabaseStruktur();
// if the file doesn't exsist stop!!! $uttrekk_db_ini_array = parse_ini_file("ini/destination_db.ini"); $uttrekk_db_host = $uttrekk_db_ini_array['uttrekk_db_host']; $uttrekk_db_user = $uttrekk_db_ini_array['uttrekk_db_user']; $uttrekk_db_pswd = $uttrekk_db_ini_array['uttrekk_db_pswd']; $uttrekk_db_database = $uttrekk_db_ini_array['uttrekk_db_database']; print_r($uttrekk_db_ini_array); echo "\n"; $uttrekkMySQLBase = null; $extractor = null; $uttrekkDirectory = "./uttrekksfiler"; $noarkIHoutputDir = "./"; // Main program starts here $uttrekkMySQLBase = null; try { $uttrekkMySQLBase = new UtrekkMySQLBase($uttrekk_db_host, $uttrekk_db_user, $uttrekk_db_pswd, $uttrekk_db_database); } catch (Exception $e) { echo $e->getMessage(); } if ($uttrekkMySQLBase == null) { echo "Problem med kobling til Uttrekksbasen\n"; return; } $databaseParameters = new MySQLDBParameters($uttrekk_db_host, 3306, $uttrekk_db_database, $uttrekk_db_user, $uttrekk_db_pswd); $extractor = new Extractor("mysql", $databaseParameters, $uttrekkDirectory); $extractor->deleteDirectoryAndContents(); $extractor->createDirectory(); $logDir = $extractor->getLogDir(); $logger = new Logger($logDir, false, false, true); echo "\nSlettet gamle filer (hvis de eksisterte) og oppretter mappe for uttrekk ({$uttrekkDirectory}) \n"; $noark4DatabaseStruktur = new Noark4DatabaseStruktur();