I'm trying to write my own MY_Model base class but I'm facing a weird problem:
/core/MY_Model.php
function __construct() {
if ( !empty($this->table)) {
// query db, etc.
}
else {
// even though that I set $this->table value
// in the child class, I always ended up here
// it's always empty!!!!
log_message('error', 'some error message');
}
// ...
}
}
/models/test_model.php
function __construct() {
parent::__construct();
}
// ...
}
even though that I set $this->table value in the child class, I always ended up finding $table value empty in MY_Model class, it's always empty!!!! any hint please?!