This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pagination Issue

 
kishore kovil
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Currently , I'm dealing with pagination .
I'm tryiing to do it by query.
but,i'm n't successful.
Pls. help me.

code:
______

My query is:
String query = "Select * from (Select a.*, rownum rnum From (select * from "
+ TableDetails
+ " order by rowid desc)a where rownum <= "
+ (recordsPerPage * (Integer.parseInt(pageNumber)))
+ ") where rnum >"
+ (recordsPerPage * ((Integer.parseInt(pageNumber) - 1)))
+ "";

with this query,
I'm not able to get all the results.
I'm missing some records.(say, missing 2 of 6)
I mean, this is working fine for Next button in jsp , but not for Previous button.

How can i modify the query?


Pls help me.


Thanks,
Kishore
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kishore,
First, try printing out the query. Are the indices what you expect?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic