I ran into a problem because I am sure that I will not do it correctly with my programming.
I created a custom model in Magento.
In the database table of my model there are several objects with the same attributes ...
I need to select only one of all these objects with the same attribute that I have.
At the moment, I have done this:
$myvariable = Mage::getModel('test/test')->getCollection()
->setOrder('idserialkeys', 'asc')
->addFilter('idproduit', 1)
->addFilter('utilise', 0)
->addFilter('customerid', 0)
->addFilter('numcommande', 0)
I have about a hundred results from this download, but I only need to update one of them, so right after that:
->setPageSize(1);
The problem is what I need foreachafter updating my object
foreach($mavaribale as $modifiemoi) {
}
, ( ), setPagesize... .
,