Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图找出表结构以用 SQL 查询替换以下内容。我还不能完全解决这个问题。
$product = Mage::getModel('catalog/product')->load($product_id); return $product->getAttributeText('Color');
您无需弄清楚表结构并再次在 SQL 中构建查询。
只需在文件中启用$_debug和,下次刷新任何特定页面时,您就可以在文件中看到在 Magento 中运行的每个查询。$_logAllQuerieslib/Varien/Db/Adapter/Pdo/Mysql.phpvar/debug/pdo_mysql.log
$_debug
$_logAllQueries
lib/Varien/Db/Adapter/Pdo/Mysql.php
var/debug/pdo_mysql.log