• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Displaying 4 Columns: 1 Row Equals 2 Entries.

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have run across an interesting problem. I need to display some data using 4 columns. The problem I am having is that columns 1 and 2 are the same as 3 and 4 except columns 3 and 4 are the next entry in the ResultSet.

I have no problems using just 2 columns and have 1 entry per row. But I need 2 entries per row and I am unclear on how to do this while iterating over my collection of data. Any hints, tips would be appreciated.

Thanks.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An idea...

when you are looping through

have a counter, when it hits 2 records it prints out the next row (TR) tags...

Eric
 
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could have an inner loop with only two iterations between your <TR> and </TR> tags.

Jules
reply
    Bookmark Topic Watch Topic
  • New Topic