magento中打印运行的SQL语句
使用colleciton->getSelectSql()输出运行的SQL语句$collection = Mage::getModel('catalog/category')->getCollection();echo $collection->getSelectSql(true);$collection->getSelectSql()->__toString();magento获取
·
使用colleciton->getSelectSql()输出运行的SQL语句
magento获取SQL语句的另外一种方法是设置打印SQL为true
$collection = Mage::getModel('catalog/category')->getCollection();
echo $collection->getSelectSql(true);
$collection->getSelectSql()->__toString();
magento获取SQL语句的另外一种方法是设置打印SQL为true
$collection=Mage::getResourceModel('reports/product_collection');
$collection->printlogquery(true);
更多推荐

所有评论(0)