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


PHP OA_Dal::getTablePrefix方法代码示例

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


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

示例1: updateAuditContext

 /**
  * Replaces the existing "context" column in "audit" table with apropriate table names
  *
  * @return boolean
  */
 function updateAuditContext()
 {
     $tblAudit = $this->oUpgrade->oDbh->quoteIdentifier(OA_Dal::getTablePrefix() . 'audit', true);
     foreach ($this->aContexts as $contextOld => $contextNew) {
         $query = 'UPDATE ' . $tblAudit . ' SET context = ' . $this->oUpgrade->oDbh->quote($contextNew) . ' WHERE context = ' . $this->oUpgrade->oDbh->quote($contextOld);
         $result = $this->oUpgrade->oDbh->exec($query);
         if (PEAR::isError($result) || $result === false) {
             $this->logError('Error while updating audit context: ' . $result->getUserInfo());
             return false;
         }
     }
     $this->logOnly('audit context values updated');
     return true;
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:19,代码来源:postscript_openads_upgrade_2.5.67-beta-rc3.php

示例2: _addPrefixToTableName

 /**
  * Add a prefix to table name and save oroginal table name in _tableName
  *
  * @access private
  */
 function _addPrefixToTableName()
 {
     if (empty($this->_tableName)) {
         $this->_prefix = OA_Dal::getTablePrefix();
         $this->_tableName = $this->__table;
         $this->__table = $this->_prefix . $this->__table;
     }
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:13,代码来源:DB_DataObjectCommon.php

示例3: getStatisticsTableName

 /**
  * Returns the bucket's destination statistics table, that is, the
  * table that is defined in the component's plugin to store the
  * aggregate bucket data for the components.
  *
  * @return string The statistics table name with added prefix.
  */
 public function getStatisticsTableName()
 {
     return OA_Dal::getTablePrefix() . $this->getStatisticsName();
 }
开发者ID:hostinger,项目名称:revive-adserver,代码行数:11,代码来源:DeliveryLog.php

示例4: testAutoincrementsVsSerial

 function testAutoincrementsVsSerial()
 {
     $prefix = OA_Dal::getTablePrefix();
     $oDbh = OA_DB::singleton();
     $table = $oDbh->quoteIdentifier($prefix . 'ad_category_assoc');
     $sqlInsert = "INSERT INTO {$table} (category_id, ad_id) VALUES (1, 1)";
     DBC::execute($sqlInsert);
     // Take generated primary key
     $doAd_category_assoc = OA_Dal::factoryDO('ad_category_assoc');
     $doAd_category_assoc->find($aufetch = true);
     $id1 = $doAd_category_assoc->ad_category_assoc_id;
     // Now lets generate new record using DataGenerator
     $id2 = DataGenerator::generateOne('ad_category_assoc');
     // Not only above code should work but also id2 should be equal id1+1
     $this->assertEqual($id2, $id1 + 1);
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:16,代码来源:DB_DataObjectCommon.dal.test.php

示例5: outdateSession

 function outdateSession()
 {
     $sessionId = SESSIONID;
     $prefix = OA_Dal::getTablePrefix();
     $table = $this->dbh->quoteIdentifier($prefix . 'session');
     $this->dbh->exec("UPDATE {$table} set lastused = '2005-01-01 01:00:00' WHERE sessionid = '{$sessionId}'");
 }
开发者ID:Jaree,项目名称:revive-adserver,代码行数:7,代码来源:Session.dal.test.php

示例6: getTablePrefix

 function getTablePrefix()
 {
     return OA_Dal::getTablePrefix();
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:4,代码来源:Common.php


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