I have a catalog with near 90000 products. I need to retrieve all the products sku that have no image associated. With a sql query I can get the id list of all the products without image. From that ID I need to get the product sku. So, I have an $ids array with all the products without image (near 60000).
I'm trying to get all the corresponding skus by using something easy with the magento api:
foreach ($ids as $id){
$product = Mage::getModel('catalog/product')->load($id);
echo $product->getSku()."\n";
}
But this causes a PHP Fatal error: Allowed memory size... (memory size is 1024Mb and I cannot change it).
My question is: from this $ids array, how can I get all the corresponding sku without causing a memory size error? Is there a lighter way of getting a product attribute having the product id?