本文整理汇总了PHP中OA_DB::dropDatabase方法的典型用法代码示例。如果您正苦于以下问题:PHP OA_DB::dropDatabase方法的具体用法?PHP OA_DB::dropDatabase怎么用?PHP OA_DB::dropDatabase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OA_DB
的用法示例。
在下文中一共展示了OA_DB::dropDatabase方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doUpgrade
return $aMessages;
}
function doUpgrade($dbname)
{
global $oUpgrader;
$GLOBALS['_MAX']['CONF']['database']['name'] = $dbname;
$oUpgrader->oDBUpgrader->doBackups = false;
if ($oUpgrader->upgrade()) {
$aMessages[] = 'Your database has successfully been upgraded to version ' . OA_VERSION;
} else {
$aMessages[] = 'Your database has NOT been upgraded to version ' . OA_VERSION;
}
return $aMessages;
}
if (array_key_exists('btn_data_drop', $_POST)) {
OA_DB::dropDatabase($_POST['dbname']);
}
$oIntegrity = new OA_DB_Integrity();
$GLOBALS['_MAX']['CONF']['table']['prefix'] = '';
$datasetfile = $_REQUEST['datasetfile'];
$aDatasetFile = $oIntegrity->getSchemaFileInfo(TD_DATAPATH, $datasetfile);
if (array_key_exists('error', $aDatasetFile)) {
$aMessages[] = $aDatasetFile['error'];
} else {
$oIntegrity->version = $aDatasetFile['version'];
$oUpgrader = new OA_Upgrade();
$aMessages = getUpgradeStatus($aDatasetFile['name']);
}
if (array_key_exists('btn_data_integ', $_REQUEST)) {
if ($oIntegrity->init($_REQUEST['compare_version'], $aDatasetFile['name'])) {
$oIntegrity->checkIntegrity();
示例2: _dropDatabase
/**
* remove the currently connected database
*
* @param boolean $log
*/
function _dropDatabase($log = true)
{
if ($this->can_drop_database) {
if (OA_DB::dropDatabase($this->aDsn['database']['name'])) {
if ($log) {
$this->oLogger->log('Installation dropped the database ' . $this->aDsn['database']['name']);
}
return true;
}
$this->oLogger->logError('Installation failed to drop the database ' . $this->aDsn['database']['name']);
return false;
} else {
$this->oTable->dropAllTables();
if ($log) {
$this->oLogger->log('Installation dropped the core tables from database ' . $this->aDsn['database']['name']);
}
return true;
}
}
示例3: teardownDB
/**
* A method for tearing down (dropping) the test database.
*/
static function teardownDB()
{
$aConf = $GLOBALS['_MAX']['CONF'];
$result = OA_DB::dropDatabase($aConf['database']['name']);
unset($GLOBALS['_OA']['CONNECTIONS']);
$GLOBALS['_MDB2_databases'] = array();
}