Welcome Guest, Not a member yet? Register   Sign In
Simple SQL question from a beginner...
#4

[eluser]Aken[/eluser]
I would use two separate queries. As that stands, you're going to have a lot of redundant profile data.

In my model, I would create three functions:

1) A function to pull the individual profiles.
2) A function to pull all category info associated with a given profile ID.
3) A function that uses the two previous functions and creates an array or object that is organized and ready for easy displaying in your view. It would call #1, loop it, call #2 for each profile, and generate the data.


Messages In This Thread
Simple SQL question from a beginner... - by El Forum - 01-12-2010, 05:22 PM
Simple SQL question from a beginner... - by El Forum - 01-12-2010, 07:11 PM
Simple SQL question from a beginner... - by El Forum - 01-16-2010, 09:16 AM
Simple SQL question from a beginner... - by El Forum - 01-16-2010, 06:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB