[eluser]yNaxon[/eluser]
Hello,
in my config file i loaded the database library:
Code:
$autoload['libraries'] = array('parser','database');
but when i'm trying to use it on my model, it does not set:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Code:
class Layout extends CI_Model {
public function generate_menu($limit)
{
$query = $this->db->query("SELECT * FROM `categories` ORDER BY `order` ASC LIMIT {$limit}");
$result = $query->result_array();
}
}
The error:
Code:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Autoload_View::$db
Filename: core/Model.php
Line Number: 50
what's wrong?
Thanks,
Yonatan.