i can return this like a string?
Similar Zend Framework ->__toString()
here i select my categories (just name) when is active…
$categories = Mage::getModel('catalog/category')
->getCollection()
->addAttributeToSelect('name')
->addFieldToFilter('is_active', 1);
i want see that like string sql query “SELECT * …”
(string)$categories->getSelect();You have to use the
getSelect()function and cast the results of that to a string. It will make use of the aforementioned__toString()function and return the results of the query.