當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Varien_Db_Adapter_Interface::getTableName方法代碼示例

本文整理匯總了PHP中Varien_Db_Adapter_Interface::getTableName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Varien_Db_Adapter_Interface::getTableName方法的具體用法?PHP Varien_Db_Adapter_Interface::getTableName怎麽用?PHP Varien_Db_Adapter_Interface::getTableName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Varien_Db_Adapter_Interface的用法示例。


在下文中一共展示了Varien_Db_Adapter_Interface::getTableName方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _processTemplates

 /**
  * @param $data
  */
 protected function _processTemplates(&$data)
 {
     $config = $this->_adapter->getConfig();
     $select = $this->_adapter->select();
     $select->from('information_schema.tables', 'AUTO_INCREMENT')->where('table_schema = ?', $config['dbname'])->where('table_name = ?', $this->_adapter->getTableName('customer_entity'));
     $nextId = $this->_adapter->fetchOne($select);
     foreach ($data['account'] as &$field) {
         $field = str_replace('{id}', $nextId, $field);
     }
     foreach ($data['address'] as &$address) {
         foreach ($address as &$field) {
             $field = str_replace('{id}', $nextId, $field);
         }
     }
 }
開發者ID:AnyMarket,項目名稱:magento,代碼行數:18,代碼來源:Customergenerator.php

示例2: _processTemplates

 protected function _processTemplates(&$data)
 {
     $config = $this->_adapter->getConfig();
     $select = $this->_adapter->select();
     $magentoVersion = Mage::getVersion();
     //vietdq fix checkout 1.5
     if (version_compare($magentoVersion, '1.5', '>=') && version_compare($magentoVersion, '1.6', '<')) {
         $tableName = Mage::getSingleton('core/resource')->getTableName('customer_entity');
     } else {
         $tableName = $this->_adapter->getTableName('customer_entity');
     }
     $select->from('information_schema.tables', 'AUTO_INCREMENT')->where('table_schema = ?', $config['dbname'])->where('table_name = ?', $tableName);
     $nextId = $this->_adapter->fetchOne($select);
     foreach ($data['account'] as &$field) {
         $field = str_replace('{id}', $nextId, $field);
     }
     foreach ($data['address'] as &$address) {
         foreach ($address as &$field) {
             $field = str_replace('{id}', $nextId, $field);
         }
     }
 }
開發者ID:cabrerabywaters,項目名稱:magentoSunshine,代碼行數:22,代碼來源:Posorder.php


注:本文中的Varien_Db_Adapter_Interface::getTableName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。