Results 1 to 9 of 9
May 1, 2011, 21:09 #1
- Join Date
- Aug 2003
- Southern California
- 19 Post(s)
- 0 Thread(s)
Help needed in using an array to replace nested sql queries
Running into some trouble with the MVC approach and I think it's a result of "old world" thinking. Basically I'm trying to understand how to implement the right array structure to aovid nested querying [potentially requiring me to put the query into the view].
For the sake of the question I've simplified the structure.
I've got two tables:
What I want to display out is the list name and the items under it. Those items are essentially infinite as is the number of lists so it's not a simple join issue.
How would I go about building an array structure to collect both the top level list details as well as the corresponding, and potentially infinite, list item records in my model then loop them back out to a view and thus avoid stacking up queries?
Last edited by Ted S; May 2, 2011 at 09:31.- Ted S