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


PHP CM_Db_Db::getClient方法代码示例

本文整理汇总了PHP中CM_Db_Db::getClient方法的典型用法代码示例。如果您正苦于以下问题:PHP CM_Db_Db::getClient方法的具体用法?PHP CM_Db_Db::getClient怎么用?PHP CM_Db_Db::getClient使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CM_Db_Db的用法示例。


在下文中一共展示了CM_Db_Db::getClient方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: runUpdate

 /**
  * @param integer     $version
  * @param string|null $namespace
  */
 public function runUpdate($version, $namespace = null)
 {
     $versionBumps = CM_App::getInstance()->runUpdateScript($namespace, $version);
     if ($versionBumps > 0) {
         $db = CM_Db_Db::getClient()->getDatabaseName();
         CM_Db_Db::exec('DROP DATABASE IF EXISTS `' . $db . '_test`');
     }
 }
开发者ID:cargomedia,项目名称:cm,代码行数:12,代码来源:Cli.php

示例2: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     self::$_client = CM_Db_Db::getClient();
     CM_Db_Db::exec('CREATE TABLE `test` (`id` INT(10) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`))');
 }
开发者ID:NicolasSchmutz,项目名称:cm,代码行数:5,代码来源:StatementTest.php

示例3: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     self::$_client = CM_Db_Db::getClient();
 }
开发者ID:cargomedia,项目名称:cm,代码行数:4,代码来源:ResultTest.php

示例4: _getVariationListFixture

    /**
     * @param CM_Splittest_Fixture $fixture
     * @param bool|null            $updateCache
     * @return array
     */
    protected function _getVariationListFixture(CM_Splittest_Fixture $fixture, $updateCache = null)
    {
        $columnId = $fixture->getColumnId();
        $columnIdQuoted = CM_Db_Db::getClient()->quoteIdentifier($columnId);
        $fixtureId = $fixture->getId();
        $updateCache = (bool) $updateCache;
        $cacheKey = self::_getCacheKeyFixture($fixture);
        $cache = CM_Cache_Local::getInstance();
        if ($updateCache || ($variationListFixture = $cache->get($cacheKey)) === false) {
            $variationListFixture = CM_Db_Db::exec('
				SELECT `variation`.`splittestId`, `variation`.`name` AS `variation`, `splittest`.`createStamp` AS `flushStamp`
					FROM `cm_splittestVariation_fixture` `fixture`
					JOIN `cm_splittestVariation` `variation` ON(`variation`.`id` = `fixture`.`variationId`)
					JOIN `cm_splittest` `splittest` ON(`splittest`.`id` = `fixture`.`splittestId`)
					WHERE `fixture`.' . $columnIdQuoted . ' = ?', array($fixtureId))->fetchAllTree();
            $cache->set($cacheKey, $variationListFixture);
        }
        return $variationListFixture;
    }
开发者ID:NicolasSchmutz,项目名称:cm,代码行数:24,代码来源:Splittest.php


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