Can someone tell me the Sql that this query runs?

$category = Mage::getModel('catalog/category')->getCollection();
            $category->addAttributeToFilter("Top_Menu" , array('eq' => '146'));
            $category->setOrder("parent_id", "ASC");

1 Answer 1


You can simply find this yourself by adding a true as first param to ->load();

public function load($printQuery = false, $logQuery = false)

  • Or you can do $categroy->getSelect()->__toString() Commented Nov 17, 2014 at 18:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.