$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToSelect('name');
$collection->addAttributeToFilter('small_image', array('notnull' => ''));
$collection->setOrder('name', 'asc');
$collection->load();
echo '<pre>' . $collection->getSelect()->__toString() . '</pre>';
Sunday, February 8, 2015
Get MySQL Query String
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment