Magento查询\uuuu toString()类似Zend
我可以像字符串一样返回这个吗? 类似Zend框架->\uuuToString() 在这里,我选择我的类别(只是名称)时,是活跃的Magento查询\uuuu toString()类似Zend,magento,Magento,我可以像字符串一样返回这个吗? 类似Zend框架->\uuuToString() 在这里,我选择我的类别(只是名称)时,是活跃的 $categories = Mage::getModel('catalog/category') ->getCollection() ->addAttributeToSelect('name') ->addFieldToFilter('is_active', 1); 我希望看到类似字符串sql查询“S
$categories = Mage::getModel('catalog/category')
->getCollection()
->addAttributeToSelect('name')
->addFieldToFilter('is_active', 1);
我希望看到类似字符串sql查询“SELECT*…”(string)$categories->getSelect()代码>
您必须使用getSelect()
函数并将结果转换为字符串。它将使用前面提到的\uu toString()
函数并返回查询结果