model($model[, $name = ''[, $db_conn = FALSE]])
Parameters: |
|
---|---|
Returns: |
CI_Loader instance (method chaining) |
Return type: |
CI_Loader |
$this->load->model('model_name');
If your model is located in a subdirectory, include the relative path from your models directory. For example, if you have a model located at application/models/blog/Queries.php you’ll load it using:
$this->load->model('blog/queries');
If you would like your model assigned to a different object name you can specify it via the second parameter of the loading method:
$this->load->model('model_name', 'fubar'); $this->fubar->method();
Please login to continue.