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


PHP Varien_Db_Adapter_Interface::fetchRow方法代码示例

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


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

示例1: testInsertForce

 /**
  * @dataProvider insertDataProvider
  */
 public function testInsertForce($data)
 {
     $this->assertEquals(1, $this->_connection->insertForce($this->_tableName, $data));
     $select = $this->_connection->select()->from($this->_tableName);
     $result = $this->_connection->fetchRow($select);
     $this->assertEquals($data, $result);
 }
开发者ID:nemphys,项目名称:magento2,代码行数:10,代码来源:InterfaceTest.php

示例2: testWriteEncoded

 /**
  * Assert that session data writes to DB in base64 encoding
  */
 public function testWriteEncoded()
 {
     $data = serialize($this->_sessionData[self::SESSION_NEW]);
     $this->_model->write(self::SESSION_ID, $data);
     $select = $this->_connection->select()->from($this->_sessionTable)->where(self::COLUMN_SESSION_ID . ' = :' . self::COLUMN_SESSION_ID);
     $bind = array(self::COLUMN_SESSION_ID => self::SESSION_ID);
     $session = $this->_connection->fetchRow($select, $bind);
     $this->assertEquals(self::SESSION_ID, $session[self::COLUMN_SESSION_ID]);
     $this->assertTrue(ctype_digit((string) $session[self::COLUMN_SESSION_EXPIRES]), 'Value of session expire field must have integer type');
     $this->assertEquals($data, base64_decode($session[self::COLUMN_SESSION_DATA]));
 }
开发者ID:natxetee,项目名称:magento2,代码行数:14,代码来源:SessionTest.php

示例3: _isAvailableUrl

 /**
  * Check unique url_key value in catalog_category_entity_url_key table.
  *
  * @param Mage_Catalog_Model_Abstract $object
  * @return bool
  * @throws Mage_Core_Exception
  */
 protected function _isAvailableUrl($object)
 {
     $select = $this->_connection->select()->from($this->getAttribute()->getBackendTable(), array('entity_id', 'store_id'))->where('value = ?', $object->getUrlKey())->limit(1);
     $row = $this->_connection->fetchRow($select);
     // we should allow save same url key for product in current store view
     // but not allow save existing url key in current store view from another store view
     if (empty($row)) {
         return true;
     } elseif ($object->getId() && $object->getStoreId() !== null && ($row['store_id'] == $object->getStoreId() && $row['entity_id'] == $object->getId())) {
         return true;
     }
     return false;
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:20,代码来源:Urlkey.php

示例4: getCategoryId

 /**
  * Retrieve category instance by specified parameters
  *
  * @param Mage_Core_Model_Resource $resource
  * @param array $row
  * @return int
  */
 function getCategoryId($resource, $row)
 {
     $select = $this->_connection->select()->from(array('nur' => $resource->getTableName('enterprise_url_rewrite')))->join(array('e' => $resource->getTableName(array('catalog/category', 'url_key'))), 'nur.value_id = e.value_id')->where('nur.url_rewrite_id = ' . $row['url_rewrite_id']);
     $entityRow = $this->_connection->fetchRow($select);
     return $entityRow['entity_id'];
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:13,代码来源:Migration.php


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