|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
Try using the following syntax:
select * from table first x rows only |
|
#3
|
|||
|
|||
|
Hi,
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" ? |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
|||
|
|||
|
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 ... ? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > Displaying queries on multiple pages |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|