php - Codeigniter MY_Model class -


i'm trying write own my_model base class i'm facing weird problem:

/core/my_model.php

    function __construct() {         if ( !empty($this->table)) {             // query db, etc.         }         else {             // though set $this->table value              // in child class, ended here             // it's empty!!!!             log_message('error', 'some error message');         }         // ...     } } 

/models/test_model.php

    function __construct() {         parent::__construct();     }      // ...  } 

even though set $this->table value in child class, ended finding $table value empty in my_model class, it's empty!!!! hint please?!

unless need specific/special - should use jamie rumbelows "my_model" - better write (or me) - , allows focus writing other code. no need re-invent wheel.

you can code github here

and here awesome tutorial shows how use my_model in application.

honestly - give go - wont regret it.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -