Welcome Guest, Not a member yet? Register   Sign In
DB error after CI 1.6.1 upgrade
#1

[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


Messages In This Thread
DB error after CI 1.6.1 upgrade - by El Forum - 02-15-2008, 04:03 AM
DB error after CI 1.6.1 upgrade - by El Forum - 02-15-2008, 04:22 AM
DB error after CI 1.6.1 upgrade - by El Forum - 02-15-2008, 05:28 AM
DB error after CI 1.6.1 upgrade - by El Forum - 02-15-2008, 05:31 AM
DB error after CI 1.6.1 upgrade - by El Forum - 02-15-2008, 05:31 AM
DB error after CI 1.6.1 upgrade - by El Forum - 02-15-2008, 06:17 AM
DB error after CI 1.6.1 upgrade - by El Forum - 02-15-2008, 09:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB