Access table to add a new row
-
30-10-2019 - |
题
I created a new module softcopy
. and also created a new table with six fields of name softcopy_softcopy
.
I am trying to access the table so that I can add a new row with some data which I have in controller.
So, I tried the below code in softcopy
controller:
echo Mage::getResourceModel('catalog/product_collection')->getTable('softcopy/softcopy');
I got the following error in var/report
:
a:5:{i:0;s:47:"Can't retrieve entity config: softcopy/softcopy";i:1;s:1469:"#0
How should I access my newly created table in my controller?
config.xml
<?xml version="1.0"?>
<config>
<modules>
<Efk_Softcopy>
<version>1.0</version>
</Efk_Softcopy>
</modules>
<frontend>
<routers>
<Efk_Softcopy>
<use>standard</use>
<args>
<module>Efk_Softcopy</module>
<frontName>softcopy</frontName>
</args>
</Efk_Softcopy>
</routers>
</frontend>
<global>
<models>
<softcopy>
<class>Efk_Softcopy_Model</class>
</softcopy>
</models>
<blocks>
<softcopy>
<class>Efk_Softcopy_Block</class>
</softcopy>
</blocks>
</global>
</config>
没有正确的解决方案