CodeIgniter Forums
Using Model inside another model - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Using Model inside another model (/showthread.php?tid=20622)

Pages: 1 2


Using Model inside another model - El Forum - 07-20-2009

[eluser]TheFuzzy0ne[/eluser]
To re-enforce what wiredesignz was saying - You'd be much better off just using require_once to include the class, and then instantiating them individually as you've done so above. The CodeIgniter loader has been designed to load only single instance objects, and so instantiates your model within the scope of the CodeIgniter super object, which in this case, isn't very useful to you.