[eluser]herbageonion[/eluser]
Hi, I'm getting the following error when I try to run my news page. Its not a case issue, as I have everything as the user guide says.
I'm really stuck, can anyone help me?
Code:
An Error Was Encountered
Unable to locate the model you have specified: news_model
Code:
class News extends Controller
{
function News()
{
parent::Controller();
// Load Helpers
$this->load->helper( array('url', 'date', 'text', 'form') );
// Load Libraries
$this->load->library( array('session', 'validation', 'pagination') );
// Load Models
$this->load->model('news_model');
if ($this->session->userdata('logged_in') != true )
{
redirect('login', 'location');
}
}
function index()
{
}
}
Code:
class News_model extends Model {
function News_model()
{
parent::Model();
}
function get_news($num = 0, $offset = 0)
{
$num = (isset($num)) ? $num : 0;
$offset = (isset($offset)) ? ', '.$offset : ', 0';
$query = $this->db->query("SELECT * FROM `cms_news` ORDER BY news_date DESC LIMIT $num, $offset");
return $query;
}
}