This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC 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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "paging with mysql and java" Watch "paging with mysql and java" New topic
Author

paging with mysql and java

Jitto P.Jose
Greenhorn

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;
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....


Get updated with the world http://hallowdemon.ismywebsite.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: paging with mysql and java
 
Similar Threads
Solving for Page With Slow Response Time
Want clarification for some of the methods of Criteria class of org.hibernate
select values that do not have state = x
How to do Paging in struts
How can I paging use mysql'seek function?