How to print Magento SQL Query?
magento

How to print Magento SQL Query?

KrikaSoft
08 Jun 2014 16:27

To get a generated SQL query in Magento we need to get collection object and using the collection we can get SQL Query by using bellow code.

/** Get SQL Qeury generated for Collection */
$this->_collection->getSelect()->__toString();