How-to get SQL query string from Mage

 
<?php
 
        $collection = Mage::getResourceModel('mybrands/orders')
            ->addFieldToSelect('name')
	    ->addFieldToSelect('order_id');
 
        echo '<pre>';
        print_r($collection->getSelect()->__toString());

Leave a Reply