Welcome Guest, Not a member yet? Register   Sign In
Displaying Parent/Child lists
#2

[eluser]Phil Sturgeon[/eluser]
Right now I presume you have one single loop with a join in the SQL to output their names and their department names.

There are two ways to achieve the separate lists. You can either use a switch in the main database loop (look in the PHP manual for help with switches) and then you can make 3 seperate arrays.

OR

you can simply have one big SQL query calling all different departments, then for each appartment run a SQL query getting the names from this type.

Hope that wasn't too vague. You said it was a logic issue, not code, therefore didnt use code ^_^


Messages In This Thread
Displaying Parent/Child lists - by El Forum - 06-30-2007, 02:26 PM
Displaying Parent/Child lists - by El Forum - 06-30-2007, 04:23 PM
Displaying Parent/Child lists - by El Forum - 06-30-2007, 05:25 PM
Displaying Parent/Child lists - by El Forum - 07-01-2007, 03:46 AM
Displaying Parent/Child lists - by El Forum - 07-01-2007, 09:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB