Skip to content

Conversation

webquail
Copy link

@webquail webquail commented Jul 8, 2015

The class will automatically use the default database connection, and even load it for you if you haven't yet.

You can specify a database connection on a per-model basis by declaring the _$database instance variable. This is equivalent to calling $this->db->database($this->_database, TRUE).

class Post_model extends MY_Model
{
    public $_database = 'group_name';
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant