开发者

Magento - Retrieve data from database and showing duplicate result

开发者 https://www.devze.com 2023-01-26 09:36 出处:网络
Hi I have created a simple module to retrieve database data, I have the code $data = Mage::getModel(\'cms/page\')->load($params[id]); to get the table and var_dump($data);

Hi I have created a simple module to retrieve database data, I have the code $data = Mage::getModel('cms/page')->load($params[id]); to get the table and var_dump($data); to display the result, but I get duplicate result when accessing http://xxxxxxxxx/beta/index.php/cms/index/testModel/id/1

Please get the module at http://www.mediafire.com/?cj80kkhye252g1k

Why I 开发者_如何学JAVAget duplicate result? Thanks you


I think that you're seeing a vardump of a raw model (its originalData and actual Data). Try

vardump($data->getData());

This should show only the things that you're interested in.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号