Magento reemplaza la llamada ORM con SQL

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');

preguntado el 31 de julio de 12 a las 15:07

Can I know why you reverted accepted answer? -

1 Respuestas

You don't need to figure out table structure and build your query in SQL again.

Solo habilita $_debug y $_logAllQueries en el archivo lib/Varien/Db/Adapter/Pdo/Mysql.php and the next time you refresh any particular page, you could see every query that is ran in Magento in var/debug/pdo_mysql.log archivo.

Respondido 31 Jul 12, 15:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.