Welcome Guest, Not a member yet? Register   Sign In
Loading Models From library classes
#1

[eluser]Aidy[/eluser]
Hi Everyone

Sorry if this is a dumb question

Would it be possible to load and use a model in a library class and if so would it be appropriate?

Please enlighten me..
#2

[eluser]JoostV[/eluser]
Yes, it is possible.
Code:
// Instantiate the CI libraries so we can work with them
$CI =& get_instance();

$CI->load->model('somemodel');

In my opninion it can certainly be appropriate, if your library needs to fetch data from te database, for instance.
#3

[eluser]Aidy[/eluser]
Thanks JoostV

Very much appreciated




Theme © iAndrew 2016 - Forum software by © MyBB