Tag Archives: codeigniter model not loading
Codeigniter load model in library
Codeigniter load model in library : Sometimes we need to load model in library. It is very simple to load model in library using CI instance. Here in this article we are going to explain how you can load model in library.
Codeigniter load model in library Syntax
Here is an example to load model using CI instance in library-
$CI =& get_instance(); $CI->load->model('your_model_name'); $result = $CI->your_model_name->function_name();
Codeigniter load model in library Example
Suppose we are loading the “Users” model and calling the model function “get_my_profile”
$CI =& get_instance(); $CI->load->model('Users'); $result = $CI->Users->get_my_profile();