[eluser]gscharlemann[/eluser]
I've added a new library to my application, but I'm getting a call to member function on non-object error:
Call to a member function get_saved_races() on a non-object
Here's the new library:
Code:
class Races
{
function Races()
{
$this->ci =& get_instance();
}
function get_saved_races($user_id) {
$this->ci->load->model('race_model', 'race');
return $this->race->get_saved_races($user_id);
}
}
I've tried this as well with no luck:
Code:
function get_saved_races($user_id) {
$this->ci->load->model('race_model');
return $this->race_model->get_saved_races($user_id);
}
I've been playing with CI long enough I thought I could figure it out, but after multiple searches and over an hour of being stuck I'm getting frustrated. Thanks for any insight.