Welcome Guest, Not a member yet? Register   Sign In
Fatal error with get_where()? need help
#1

[eluser]Zimooon[/eluser]
Hey guys im getting an error and don know how to fix it Sad someboday know what 2 do?



Code:
A PHP Error was encountered

Severity: Notice

Message: Undefined property: Newstest::$db

Filename: core/Model.php

Line Number: 50

Fatal error: Call to a member function get_where() on a non-object in \application\models\newstest_model.php on line 23


Line 23 is this:
Code:
public function getOneNews($nid){
        
        $query = $this->db->get_where('news',array('news_id'=>$nid));
        return $query->row(0);
     }
}

hope you can help me.

best regards




Theme © iAndrew 2016 - Forum software by © MyBB