Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get real table name in Magento

How to get magento table name dynamically?

I tried :

Mage::getSingleton('core/resource')->getConnection('core_read')->getTableName('catalog/product')

returns catalog/product, when it should return catalog_product. How do I get real table name, as defined in <table></table> tags in config.xml?

like image 540
srgb Avatar asked Oct 25 '12 12:10

srgb


1 Answers

use instead :

echo Mage::getSingleton('core/resource')->getTableName('catalog/product');

outputs catalog_product_entity

like image 164
Jscti Avatar answered Nov 12 '22 17:11

Jscti