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;
	}

 

你可能感兴趣的:(Collection)