Q:

Load multiple products by custom attribute into a collection [magento]

Doing this:
Mage::getModel('catalog/product')->loadByAttribute('ordernumber', 500);

gives me an object of a product, which means everything with the custom attribute (ordernumber) is fine. 
Doing this, though:
Mage::getModel('catalog/product')->getCollection()
->addAttributeToSelect('ordernumber')
->addAttributeToFilter('ordernumber', 500);

returns a collection, but an empty one - without items.  And they should be 3.  Couple of hours ago it worked.  Now it stopped working, and I haven't changed anything concerning the collection or the attribute.  I have no clue what the problem might be...
The attribute is set to Yes for the Usied in Product Listing

A:

Please use
$products =  Mage::getModel('catalog/product')->loadByAttribute('ordernumber', '500'); 

ANOTHER WAY
Mage::getModel('catalog/product')
        ->getCollection()
        ->addAttributeToSelect('*')
        ->addFieldToFilter('ordernumber','500')

