How To Print Magento Collection Query String

Is there a way to display the resulting query in a string format, like full SQL query for product load

Here is the example to print the Magento collection query string.

$collection = Mage::getModel('catalog/product')->getCollection();
echo $collection->getSelect()->__toString();
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments