Remove magento footer links.

If you want to remove the “Help Us to Keep Magento Healthy – Report All Bug” from footer, navigate to

app/design/frontend/default/default/template/page/html/footer.phtml 

of your theme assuming that you are using default magento theme . Otherwise navigate to your related theme file and remove the following line

<p class="bugs"><?php echo $this->__('Help Us to Keep Magento Healthy') ?> - <a href="http://www.magentocommerce.com/bug-tracking" onclick="this.target='_blank'"><strong><?php echo $this->__('Report All Bugs') ?></strong></a> <?php echo $this->__('(ver. %s)', Mage::getVersion()) ?></p>

If you want to remove the menus seens in the footer like “Site Map, Search Terms, Advanced Search, Orders and Returns, Contact Us” Then remove the following code from page.xml

<block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>

Query in Magento

Magento have own standard of query,

    $products   = $product->setStoreId($storeId)->getCollection()
	->addAttributeToSelect('status')
	->addAttributeToFilter('featured', array('Yes'=>true))
	->addAttributeToSelect(array('name', 'price', 'small_image'), 'inner');

If we want to add the other condition like
for random case,

$products->getSelect()->order(new Zend_Db_Expr('RAND()'));
or
$products->getSelect()->order('rand()');

for to limit

$products->getSelect()->limit(3);
or
$products->setPageSize(5)->setCurPage(1);