Welcome Guest, Not a member yet? Register   Sign In
Requesting many different sections of database in one page
#1

[eluser]xerosis[/eluser]
I have a website where in the body section of the homepage I need to retrieve:

- News (from news table)
- Top 10 users (from users table)
- 5 latest games (from games table)
- 5 latest videos (from videos table)
- 5 latest slideshow (from slideshow table)

I already have a model for each of these where I can add, update, retrieve, and delete them.

What I want to know is on my Main Controller (which manages the homepage) must I:

- Call each model
- Use the GetUser, GetNews, GetGames, etc. functions to retrieve the data.
- Save each as for example $data['user'], $data['news'], $data['game'] etc.
- Send $data with view?

Or should I create a specific model just for Homepage?

Thanks.


Messages In This Thread
Requesting many different sections of database in one page - by El Forum - 03-01-2011, 01:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB