|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
I'm looping through a query, and inside the while result output, I am trying to loop through a second query (created from the 1st query's row results). I have checked that both queries return info. I can see that the 1st while result output works fine, but when I get to the inner while result output, it never returns any rows (nothing in the while loop evaluates). So, IS it possible to nest one query's output loop within another, or am I doing something wrong? I can post the example code, incase my description is confusing. URL TIA, Troy |
|
#2
|
|||
|
|||
|
Yes, it can be done. But I had to instigate a second query, with a different result index variable to get the second loop to work correctly.
As a guess, I don't think that two loops can run off of the same $result index at the same time, so a second one has to be created.... Again, that's only a guess as to the reason. |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Nesting result loops within result loops possible? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|