• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HMVC problem...CI spits out undefined property when loading database.

#7
[eluser]Jamongkad[/eluser]
Ok here is the offending code...at this point is where CI cries foul saying that I'm calling on a member function get on a non object. I'm stumped...I switch back to inheriting from the Controller and it works fine. But as soon as I inherit back to TemplateController things go awry.

Code:
class Test extends TemplateController {
  
    public function show_names() {
        $this->load->database();
        $data->firstname = $this->db->get('users');
        $this->load->view('read', $data);  
    }
}


Messages In This Thread
HMVC problem...CI spits out undefined property when loading database. - by El Forum - 12-16-2009, 06:01 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.