From c8b21742927c217770e950005741850f17b5d32c Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Sun, 18 May 2008 03:57:40 +0000 Subject: documented load->model in the Loader docs --- user_guide/libraries/loader.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'user_guide/libraries') diff --git a/user_guide/libraries/loader.html b/user_guide/libraries/loader.html index c9b0bfee4..8cf5478e8 100644 --- a/user_guide/libraries/loader.html +++ b/user_guide/libraries/loader.html @@ -103,8 +103,16 @@ to your browser. Remember to assign it to a variable if you want the data retur $string = $this->load->view('myfile', '', true); +

$this->load->model('Model_name');

+

$this->load->model('Model_name');

+

If you model is located in a sub-folder, include the relative path from your models folder. 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 + function:

+ $this->load->model('Model_name', 'fubar');
+
+$this->fubar->function();

$this->load->database('options', true/false)

-

This function lets you load the database class. The two parameters are optional. Please see the database section for more info.

-- cgit v1.2.3-24-g4f1b