I have flat mode enabled and I need to filter the product collection using category id, but I am not able to. Here below is my code...
$productCollection = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('*')
->addFieldToFilter('type_id', array('eq' => 'simple'))
->addFieldToFilter('status', array('eq' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED))
->addFieldToFilter('category_id', $brandValue['category'])
->addFieldToFilter('brands', $brandValue['brand']);
But, this is not filtering on the basis of the category.