How to get data from a custom table into a block in magento <p>I have followed the steps mentioned in the link below to create a custom module in magento 1.7. <a href="http://www.webspeaks.in/2010/07/create-your-first-magento-module.html#comment-form" rel="nofollow">http://www.webspeaks.in/2010/07/create-your-first-magento-module.html#comment-form</a></p> <p>I did not create a web table, instead I have created 2 tables chefdetail and chefproduct, and have created the Block and phtml file for the same.</p> <p>My Chefdetail block looks like:</p> <pre><code>class TruffleStreet_Web_Block_ChefDetail extends Mage_Core_Block_Template { public function _prepareLayout() { return parent::_prepareLayout(); } public function getChefDetail() { if (!$this-&gt;hasData('chefdetail')) { $this-&gt;setData('chefdetail', Mage::registry('chefdetail')); } return $this-&gt;getData('chefdetail'); } } </code></pre> <p>How do I modify it to load all the data from the chefdetail table in the database? There is data in this table, but I am not able to access it. My chefdetail.phtml file looks like:</p> <pre><code>$_chefblockData = $this-&gt;getLayout()-&gt;createBlock('web/chefdetail')-&gt;getChefDetail(); echo "Count Chef = " . count($_chefblockData) ; </code></pre> <p>Please advice how I can fix this issue?</p> <p>Thanks, Neet</p>