`
kirenenko04
  • 浏览: 146212 次
  • 性别: Icon_minigender_2
  • 来自: 上海
社区版块
存档分类
最新评论

Magento collection filter OR operator

 
阅读更多
	public function getDepartmentCollection() {
		$store_id = Mage::app()->getStore()->getStoreId();
		$collection = Mage::getModel('recruit/recruittype')->getCollection()
		->addFieldToFilter('parent_id', 0)
		->addFieldToFilter('store_id',
                    array(
                        array('eq' =>0),
                        array('eq' => $store_id),
                    )
            )
		->setOrder('position','asc')
		;
		return $collection;
	}

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics