Hi Friends, I want to display 20 records per page in my application. Can anyone provide a code snippet or an idea that accomplishes displaying only a certain part of ResultSet [first 20, 21 - 40 and so on] rather than displaying entire ResultSet.
In your SQL you need to use LIMIT. So, to select first 20 records you do select * from my_table LIMIT 0,20. But to make it pagable you need to put both values into variables and increment/decrement these values accordingly. I did this for a PHP page, but I am sure there is a working example for JSP as well. Google for 'jsp pagable resultset' or something similar.
webtekie
: Hi Friends, : I want to display 20 records per page in my application. Can anyone provide a code snippet or an idea that accomplishes displaying only a certain part of ResultSet [first 20, 21 - 40 and so on] rather than displaying entire ResultSet. :
Comments
webtekie
: Hi Friends,
: I want to display 20 records per page in my application. Can anyone provide a code snippet or an idea that accomplishes displaying only a certain part of ResultSet [first 20, 21 - 40 and so on] rather than displaying entire ResultSet.
: