当前位置: 首页>>代码示例>>PHP>>正文


PHP OA_DB::dropDatabase方法代码示例

本文整理汇总了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();
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:31,代码来源:action.php

示例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;
     }
 }
开发者ID:villos,项目名称:tree_admin,代码行数:24,代码来源:Upgrade.php

示例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();
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:10,代码来源:TestEnv.php


注:本文中的OA_DB::dropDatabase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。