CodeIgniter Forums
Too Many Model Loads? - 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: Too Many Model Loads? (/showthread.php?tid=13574)



Too Many Model Loads? - El Forum - 11-27-2008

[eluser]datguru[/eluser]
Hi there,

Is there a limit to how many Models you can load? For some reason when I try to load the models in my current code it comes up with

Quote:An Error Was Encountered

The model name you are loading is the name of a resource that is already being used: mdl_products

Any Ideas why this would be I can paste the code but its quite alot so just wondered if anyone had any general ideas?


Too Many Model Loads? - El Forum - 11-27-2008

[eluser]Jelmer[/eluser]
Isn't there already another class with the same name? Like a library or a controller? All of these are classes and trying to load a model with the same name of an already loaded library or controller might throw this error...


Too Many Model Loads? - El Forum - 11-27-2008

[eluser]datguru[/eluser]
Thanks for the suggestion. I managed to find a work around (its actually slipped my mind what I did now though! since I have now come on to another problem) once I remember what the problem is ill post it here.