Welcome Guest, Not a member yet? Register   Sign In
Inheritance of database methods (active record) by model

Is there any way for a model to inherit the default active record methods? For example, I have a model named blog_model that looks like this:
class Blog_model extends Model
    function Blog_model()
I know that I can define my own custom methods, however, I would like the model to also have access to things like:
$this->db->get() // would be $this->blog_model->get()
$this->db->getwhere() // would be $this->blog_model->getwhere()
$this->db->select()  // would be $this->blog_model->select()
$this->db->from() // would be $this->blog_model->from()
Is there any way to do this without explicitly defining those functions in my model?

Thanks in advance.

Theme © iAndrew 2016 - Forum software by © MyBB