Exemplo n.º 1
0
    }
}
// Confirm deletion of backup database if requested & backup db already exists
/* have no idea why this check doesn't work...keep it for now
$sql="
SELECT SCHEMA_NAME
FROM INFORMATION_SCHEMA.SCHEMATA 
WHERE SCHEMA_NAME = '".$DB_BACKUP."';
";
$existsDbBackup=sql_returns_records($sql);
if ($use_db_backup && $existsDbBackup) {
*/
$delete_db_backup = true;
if ($use_db_backup) {
    $msg_confirm_delete_db_backup = "\r\nAlso replace previous backup database '" . $DB_BACKUP . "'? (Y/N): ";
    $delete_db_backup = responseYesNoDie($msg_confirm_delete_db_backup);
    //if ($delete_db_backup===false) die ("\r\nOperation cancelled\r\n");
}
// Check basic dependencies are present: directories, files
// This is currently pretty basic, but can be expanded as needed
include_once "check_dependencies.inc";
// Checks completed
// Start timer and connect to mysql
echo "\r\nBegin operation\r\n";
include $timer_on;
$dbh = mysql_connect($HOST, $USER, $PWD, FALSE, 128);
if (!$dbh) {
    die("\r\nCould not connect to database!\r\n");
}
////////////////////////////////////////////////////////////
// Generate new empty database
Exemplo n.º 2
0
<?php

include "params.inc";
// everything you need to set is here and in global_params.inc
// Confirm basic options
$proceed = responseYesNoDie($msg_confirm);
if ($proceed === false) {
    die("\r\nOperation cancelled\r\n");
}
// Check for required files
include_once "check_required_files.inc";
// Start timer and connect to mysql
echo "\r\n********* Begin operation *********\r\n\r\n";
include $timer_on;
$dbh = mysql_connect($HOST, $USER, $PWD, FALSE, 128);
if (!$dbh) {
    die("\r\nCould not connect to MySQL!\r\n");
}
$sql = "USE `{$DB}`";
sql_execute_multiple($sql);
///////////////////////////////////////
// Populate acceptedNameID for some
// synonymous names wrongly labeled as
// "No Opinion" by Computed Acceptance
//
// Requires as input the result
// of a manual download obtained by a
// Tropicos insider! See required
// file in directory data/
///////////////////////////////////////
include_once "noOpNames_import.inc";