magento Get product collection by attribute


Example

$collection = Mage::getModel('catalog/product')->getCollection();
// Using operator
$collection->addAttributeToFilter('status', array('eq' => 1)); 
// Without operator (automatically uses 'equal' operator
$collection->addAttributeToFilter('status', 1);