Welcome Guest, Not a member yet? Register   Sign In
Codeigniter HMVC:Unable to locate the session class
#1

Does anyone have answer for this question

http://stackoverflow.com/questions/39092...on-library

I have another problem with the same  when i try to load a model i will get this error 

Message: Undefined property: Test::$db

Here is the model 

class Test_model extends CI_Model {

    function __construct() {
       parent::__construct();
       $this->load->database();
   }

   public function db_example()
   {
        return $this->db->get('mir_users');
   }



And in my controller

class Welcome extends MX_Controller {

  public function __construct()
   {
       parent::__construct();
       $this->load->model('users/test_model');
   }
   public function index()
  {

    $this->test_model->db_example();
  }
Reply




Theme © iAndrew 2016 - Forum software by © MyBB