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

[eluser]wyred[/eluser]
When studying about MVC, most examples show that we code our model in the form of a singular object. (i.e. User instead of Users).

So for example, to get the name of a user with the ID 2,
$user = new User(2);
$user->get_name();

What if I want to show a list of users?

Do I code a Users model? So all I need to do is just $Users->get_list(); ?

Hope I didn't sound confusing.


Messages In This Thread
MVC question - by El Forum - 06-29-2011, 04:31 AM
MVC question - by El Forum - 06-29-2011, 05:39 AM
MVC question - by El Forum - 06-29-2011, 07:44 AM
MVC question - by El Forum - 06-29-2011, 07:11 PM
MVC question - by El Forum - 06-29-2011, 09:59 PM
MVC question - by El Forum - 06-30-2011, 07:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB