July 20th, 2003, 10:08 PM
Displaying queries on multiple pages
I'm trying to display the first 15 queries on one page, and allow the user to click on the next page to display the next 15 pages and so on. However, I'm using JSP/IBM DB2 and DB2 doesn't have the limit function so I'm not sure how to go about it, would appreciate any assistance.
Thanks in advance.
July 21st, 2003, 10:50 PM
Try using the following syntax:
first x rows only
July 22nd, 2003, 04:33 AM
yes I've used that select statement for my first page, but how am I gona know if there are other rows in the table so that I can put a "next page" ?
July 22nd, 2003, 05:16 AM
You will need to obtain the count(*) from resultset and work through the records.
Fifty records returned
Page 1: Display 15
Page 2: Display 15
Page 3: Display 15
Page 4: Display 5
July 22nd, 2003, 05:19 AM
how do i go about getting the count ?
I'm totally clueless if say i link it to nextPage.jsp then how do i set it such that they would display
2 3 4 5 and so on ... ?