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


PHP RowManager::updateDBTable方法代码示例

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


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

示例1: updateDBTable

 /**
  * function updateDBTable
  * <pre>
  * Updates the DB table info.
  * </pre>
  * @return [void]
  */
 function updateDBTable($isDebug = false)
 {
     $status = parent::updateDBTable($isDebug);
     if ($status == true) {
         $values = $this->getArrayOfValues();
         // 	    echo "<pre>".print_r($values,true)."</pre>";
         if (isset($values['reg_id'])) {
             // update balance owing column in cim_reg_registration table
             $singleReg = new RowManager_RegistrationManager($values['reg_id']);
             // 		    $singleReg_list = $singleReg->getListIterator();
             // 		    $singleReg_array = $singleReg_list->getDataList();
             //
             // 		    reset($singleReg_array);
             // 		    $record = current($singleReg_array);
             // 		    $oldBalance = $record['registration_balance'];
             $balanceGetter = new FinancialTools();
             $balance = array();
             // 			 $balance['registration_balance'] = $oldBalance - $record['cctransaction_amount'];
             $balance['registration_balance'] = $balanceGetter->simpleCalcBalanceOwing($values['reg_id']);
             $singleReg->loadFromArray($balance);
             $singleReg->updateDBTable();
         }
     }
 }
开发者ID:andrewroth,项目名称:c4c_intranet,代码行数:31,代码来源:CreditCardTransactionManager.php

示例2: updateDBTable

 /**
  * function updateDBTable
  * <pre>
  * Updates the DB table info.
  * </pre>
  * @return [void]
  */
 function updateDBTable()
 {
     // make sure label is translated into UnicodeEntities
     $data = $this->getLabel();
     $newData = Unicode_utf8ToUnicodeEntities($data);
     $this->setLabel($newData);
     parent::updateDBTable();
     // Go Through and remove any existing xlation requests for this
     // label entry.
     $currentPageID = $this->getPageID();
     $currentKey = $this->getKey();
     $currentLanguageID = $this->getLanguageID();
     $xlationManager = new RowManager_XLationManager();
     // for each label with matching PageID & Key
     $labelManager = new RowManager_MultilingualLabelManager();
     $labelManager->setPageID($currentPageID);
     $labelManager->setKey($currentKey);
     $labelList = $labelManager->getListIterator();
     $labelList->setFirst();
     while ($label = $labelList->getNext()) {
         // delete any xlation entry with current language_id &
         // matching label_id
         if ($xlationManager->loadByLabelAndLanguage($label->getID(), $currentLanguageID)) {
             $xlationManager->deleteEntry();
         }
     }
     // next label
 }
开发者ID:andrewroth,项目名称:c4c_intranet,代码行数:35,代码来源:LabelManager.php


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