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


PHP Zend_Db_Table_Abstract::fetchRow方法代碼示例

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


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

示例1: getAttribute

 public function getAttribute($id)
 {
     if (isset($this->_attributes[$id])) {
         return $this->_attributes[$id];
     } elseif (is_numeric($id)) {
         $attribute = $this->_attributeModel->find($id)->current();
     } else {
         $where = $this->_attributeModel->select()->where($this->_attributeFieldName . ' = ?', $id);
         $attribute = $this->_attributeModel->fetchRow($where);
     }
     $this->cacheAttribute($attribute);
     return $attribute;
 }
開發者ID:laiello,項目名稱:zend-framework-eav,代碼行數:13,代碼來源:Eav.php

示例2: get_sort_categories_parents

 /**
  *
  */
 public function get_sort_categories_parents($parentId, $children = array(), $cur_level = 0)
 {
     $res_ar = array();
     $parent = parent::fetchRow('id=' . $parentId)->toArray();
     $parent['level'] = $cur_level;
     $Product = new Product();
     $c = $Product->getProductCount($parent['children']);
     $parent['c_count'] = $c;
     $res_ar = array_merge(array($parent), $children);
     if ($parent['parentId'] > 0) {
         $res_ar = $this->get_sort_categories_parents($parent['parentId'], $res_ar, $cur_level - 1);
     }
     return $res_ar;
 }
開發者ID:vitsun,項目名稱:igrushki-detkam,代碼行數:17,代碼來源:Db.php

示例3: loadRow

	public function loadRow($value, $field = false) {
		$select = $this->table->select();
		//$this->table->getAdapter()->quote($v)
		// Check if value is an array
		if (is_array($value)) {
			foreach ($value as $k => $v) {
				$select->where("`$k` = ?", $v);
			}
		}
		else {
			if (!$field) {
				$field = $this->table->getPrimary();
			}
			$select->where("`$field` = ?", $value);
		}
		$this->row = $this->table->fetchRow($select);
	}
開發者ID:redokes,項目名稱:Framework,代碼行數:17,代碼來源:Model.php

示例4: findBySlug

 /**
  * Find by slug
  *
  * @param string $slug 
  * @return App_Table
  */
 public function findBySlug($slug)
 {
     $select = $this->select();
     $select->where('slug = ?', $slug);
     return parent::fetchRow($select);
 }
開發者ID:omusico,項目名稱:logica,代碼行數:12,代碼來源:Model.php

示例5: fetchRow

 /** Fetch one result
  * @access public
  * @param array $where
  * @param string $order
  * @return Object
  */
 public function fetchRow($where = null, $order = null)
 {
     $id = md5($where->__toString());
     if (!$this->_cache->test($id) || !$this->cache_result) {
         $result = parent::fetchRow($where, $order);
         $this->_cache->save($result);
         return $result;
     } else {
         return $this->_cache->load($id);
     }
 }
開發者ID:lesleyauk,項目名稱:findsorguk,代碼行數:17,代碼來源:Caching.php

示例6: fetchRow

 /**
  * (non-PHPdoc)
  * @see Zend_Db_Table_Abstract::fetchRow()
  */
 public function fetchRow($where = null, $order = null, $offset = null)
 {
     $row = parent::fetchRow($where, $order, $offset);
     return $row;
 }
開發者ID:fredcido,項目名稱:simuweb,代碼行數:9,代碼來源:Abstract.php

示例7: lastRow

 /**
  * 取得最後一條記錄
  * 
  * @return ZtChart_Model_Db_Table_Row
  */
 public function lastRow()
 {
     return parent::fetchRow(null, array_map(function ($primary) {
         return $primary . ' DESC';
     }, $this->info(parent::PRIMARY)));
 }
開發者ID:starflash,項目名稱:ZtChart-ZF1-Example,代碼行數:11,代碼來源:Abstract.php


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