Question

I need to get the complete row from core_config_data table, to then make a few conditions. I know you can get a table by table-name, like:

->getTableName('table_name');

But i need to know if there's a way to call directly core_config_data table.

Thank you

Was it helpful?

Solution

You can call the core_config_data table's resource model:

Mage::getModel('core/config_data')->load($id)

You can even get the model from the collection, like any other collection in Magento:

Mage::getModel('core/config_data')->getCollection()->addFieldToFilter('config_id',$id);

Or just get the first item in the collection:

Mage::getModel('core/config_data')->getCollection()->getFirstItem();
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top