Welcome Guest, Not a member yet? Register   Sign In
MVC confusion redux
#1

[eluser]Maglok[/eluser]
It's another one of those 'where do I do this' things.

Some info:

2 tables: News, Person

Person has the Firstname, Lastname columns while every row in the News table has a author_id that corresponts with an id in the person table.

2 models: model_news, model_person

Model_news has a get_all() that gets the entire table of news. Model_person has a get_name() that will return a string with the fullname of a person with a parameter of ID.

1 view: newsindex

Displays the data in a nice way.

So now I have to run a get_name() for each news post on the page. But I should not call that from the view, views don't talk directly to models do they? I am a bit confused. Smile


Messages In This Thread
MVC confusion redux - by El Forum - 11-26-2009, 09:15 AM
MVC confusion redux - by El Forum - 11-26-2009, 09:21 AM
MVC confusion redux - by El Forum - 11-26-2009, 09:27 AM
MVC confusion redux - by El Forum - 11-26-2009, 10:56 AM
MVC confusion redux - by El Forum - 11-27-2009, 04:36 AM
MVC confusion redux - by El Forum - 11-27-2009, 04:56 AM
MVC confusion redux - by El Forum - 11-27-2009, 05:20 AM
MVC confusion redux - by El Forum - 11-27-2009, 05:53 AM
MVC confusion redux - by El Forum - 11-27-2009, 06:00 AM
MVC confusion redux - by El Forum - 11-27-2009, 06:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB