[eluser]razorsese[/eluser]
I have a database called : product and 2 tables in it : bookmarks and pname
When i try to get the information from table bookmarks i get the following error:
Quote:A PHP Error was encountered
Severity: Notice
Message: Undefined property: index::$mods
Filename: controllers/index.php
Line Number: 34
Code that i'm using :
Code:
class index extends CI_Controller{
public function __construct()
{
parent::__construct();
}
function display_records()
{
$query = $this->db->get('bookmarks');
foreach($query->result() as $row)
{
$result[]= $row->bookmark;
}
return $result;
}
function index()
{
$data['names'] = $this->mods->display_records();
$this->load->view('index_view',$data);
}
}