Get new product filter by recently add product id and visibility, in stock

Get new product this is code ...... get product collection which is recently product id in decending order. check which is visibilty catelog search, status enabled, in stock.

<?php
$collection = Mage::getModel('catalog/product')
->getCollection()                
->addAttributeToSelect('*')
->addAttributeToSort('entity_id', 'DESC')
->setPage(0, 10)
->joinField(
'qty',
'cataloginventory/stock_item',
'qty',
'product_id=entity_id',
'{{table}}.stock_id=1',
'left'
)
   ->addAttributeToFilter('qty', array('eq' => 0))
->addAttributeToFilter("visibility", Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);
Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($_productCollection);
foreach ($collection as $productId)
{
echo $productId->getId() . ",";
?>
  <img src="<?php echo $productId->getImageUrl(); ?>" />
<?php
}

?>

Labels: