本文整理匯總了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);
}
}
}
示例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);
}
}
}