Welcome Guest, Not a member yet? Register   Sign In
model in a model
#1

[eluser]Bramme[/eluser]
Hey guys,

Just a quick question. It's been a while since I worked with CodeIgniter and I kinda forgot: can you use models within models? I was trying to access my users model in a content model (to get the content writer's name since only an ID is stored) but I get a "Call to undefined method mdl_content::get_user()" error.

What would be the best way to solve this problem? I've copied the get_user method from the users model for now, but that just seems silly.


Messages In This Thread
model in a model - by El Forum - 12-22-2008, 06:29 AM
model in a model - by El Forum - 12-22-2008, 09:50 AM
model in a model - by El Forum - 12-22-2008, 10:51 AM
model in a model - by El Forum - 12-22-2008, 10:53 AM
model in a model - by El Forum - 12-22-2008, 12:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB