|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem with result sets and while loops
have the following code:
<% cpartner.connect(); ResultSet rsPartner = cpartner.getPartner(); ResultSet rsPartnerCategories = cpartner.getPartnerCategories(); while (rsPartnerCategories.next()) { %> <TR><TD colspan="2"><%= rsPartnerCategories.getString("PartnerCategoryName") %></TD></TR> <% while (rsPartner.next()) { %> <TR><TD valign="top"><img src="images/arrow.gif" width="10" height="10" alt=""></TD> <TD><%= rsPartnerCategories.getString("PartnerCategoryName") %>|<%= rsPartner.getString("PartnerCategoryName") %>|<%= rsPartner.getString("PartnerName") %></A><BR><BR><P></TD></TR> <% } } %> I was expecting to have the outer while spit out the results (of which there are three) and within each of those results have the inner while spit out six results. Instead I get: OuterLoopItem1 - InnerLoopItem1 - InnerLoopItem2 - InnerLoopItem.. - InnerLoopItem6 OuterLoopItem2 OuterLoopItem3 For the Inner Loop I have to have multiple columns(ID, Name, URL) Can anyone help please? Last edited by codechimp : May 6th, 2003 at 01:28 PM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > Problem with result sets and while loops |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|