Pergunta

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

Foi útil?

Solução

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();
Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top