I am trying to figure out the table structure to replace the following with an SQL query. I can’t quite wrap my head around this just yet.
$product = Mage::getModel('catalog/product')->load($product_id);
return $product->getAttributeText('Color');
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You don’t need to figure out table structure and build your query in SQL again.
Just enable
$_debugand$_logAllQueriesin the filelib/Varien/Db/Adapter/Pdo/Mysql.phpand the next time you refresh any particular page, you could see every query that is ran in Magento invar/debug/pdo_mysql.logfile.