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
<?php
class TempName_AdminLog_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Block_Widget_Grid
{
public function __construct()
{
parent::__construct();
$this->setId('tempname_admninlog_grid');
$this->setDefaultSort('increment_id');
$this->setDefaultDir('DESC');
$this->setSaveParametersInSession(true);
$this->setUseAjax(true);
}
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?
Best Answer
you can learn from this post, they provide a nice tutorial: