i'm writing a module to retrieve the data from a table (i manually created it by using phpmyadmin), but i don't know how to access it in grid.php

class TempName_AdminLog_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Block_Widget_Grid
    public function __construct()
    protected function _prepareCollection()
        ***$collection = Mage::getResourceModel('sales/order_collection')***

        return $this;
    protected function _prepareColumns()

    public function getGridUrl()


how to access the table "admin_log" in _prepareCollection method? Anyone knows what i actually have to do?

  • hkinterview,are you want to append admin_log table in Sales order collection grid,or, you want to show admin log indivisual grid
    – Amit Bera
    Apr 11, 2014 at 4:22
  • i want to build a custom grid displaying the database data.
    – hkguile
    Apr 11, 2014 at 5:17
  • then you must create an custom module which has own model
    – Amit Bera
    Apr 11, 2014 at 5:22

1 Answer 1


you can learn from this post, they provide a nice tutorial:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.