Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Pagewise ResultSet

chprvkmrchprvkmr Member Posts: 31
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

  • webtekiewebtekie Member Posts: 2
    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.
    :

Sign In or Register to comment.