Welcome Guest, Not a member yet? Register   Sign In
Fetching all rows in database table - the OOP way?
#5

[eluser]kgill[/eluser]
I'm the same as jedd, 1 model to 1 table is pointless in my opinion because you have to do a lot more on the PHP side of things just to make stuff work when a simple query would solve the problem. My models interface whatever tables they need to represent the object I'm working with. Really, isn't that the whole point of a model, to provide an interface to the data without needing to understand the underlying data structure. So I have a controller that just calls, student->getGrades($stu_id) and it gets what it needs, it shouldn't have to know that you have to hit 4 tables to get that data.


Messages In This Thread
Fetching all rows in database table - the OOP way? - by El Forum - 08-13-2009, 07:11 AM
Fetching all rows in database table - the OOP way? - by El Forum - 08-13-2009, 07:21 AM
Fetching all rows in database table - the OOP way? - by El Forum - 08-13-2009, 07:51 AM
Fetching all rows in database table - the OOP way? - by El Forum - 08-13-2009, 09:03 AM
Fetching all rows in database table - the OOP way? - by El Forum - 08-13-2009, 09:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB