It's not a secret anymore!
The moose likes JDBC and Relational Databases and the fly likes paging with mysql and java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "paging with mysql and java" Watch "paging with mysql and java" New topic

paging with mysql and java

Jitto P.Jose

Joined: Sep 18, 2007
Posts: 27
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;

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

Get updated with the world
I agree. Here's the link:
subject: paging with mysql and java
It's not a secret anymore!