get the table name with prefix in magento

August 9, 2010 | In: Magento

This is most useful when you don’t know that what will be table prefix on server side. This situation may be generate when you are developing project at local system and you know table prefix and you have no access on server side so you are not able to know what table prefix used during magento installation on server phpmyadmin.

That time you can use below code for write the table name in your custom query.
$tableName = Mage::getSingleton(‘core/resource’)->getTableName(‘product_alert_stock);