[eluser]Lockzi[/eluser]
Hello,
after upgrading to CodeIgniter 1.6.1, I keep on getting this error message
Quote:Fatal error: Call to a member function order_by() on a non-object in C:\wamp\www\system\application\models\ss_model.php on line 32
Here's my model code (little stripped)
Code:
class Ss_model extends Model
{
function Ss_model()
{
// Overloading with constructor
parent::Model();
}
function retriveRecent($offset, $limit = 30)
{
$this->db->order_by("date", "desc");
if (is_numeric($offset))
$this->db->offset($offset);
if (is_numeric($limit))
$this->db->limit($limit);
if (!is_numeric($limit) && !is_numeric($offset))
{
$count = $this->db->get('news');
return $count->result_array();
}
else
{
return $this->db->get('news');
}
}
}
Line 32 is this one
Code:
$this->db->order_by("date", "desc");
I have activated activerecord in the database.php file.
Cheers, Lockzi