• Post Reply Bookmark Topic Watch Topic
  • New Topic

paging with mysql and java

 
Jitto P.Jose
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends,
i am looking for a database paging for my application. i am using mysql. after some search, i found that there is two queries that would help to get total no of records and also paged data...what i found is given below
mysql> SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name WHERE {condition} LIMIT 10, 10;
mysql> SELECT FOUND_ROWS();

but am very new to database concepts. so i dont know how to use these 2 queries together in a function.
if anybody know about the query execute method, please give me code snippet ... i just need the query and how these 2 queries are used in same function. i am not using any stored procedures.
thank you
jittos....
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!