Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet How to load elements from db when i press next.

Have Programming Question? Ask it here!
 
 
 


Animesh Shaw
How to load elements from db when i press next.
2 Answer(s)      a year and 7 months ago
Posted in : JSP-Servlet


Hello , I am working on a project "Online Book Mart" using JSP and Servlets and I am astuck at a position. I am using MySql at back end ,. My query is:- Suppose I clicked a link java books in my project, and there are 100 books info stored in the database but i want to show only 20 at the time and there will be 5 buttons for next page means when i click next, the next 20 books will be displayed from db on the same page.

Hope you got my point , please help me, I am unable to understand how to do this.

Thank you,


Advertisement
View Answers

January 23, 2013 at 10:43 AM


hi friend, you can use the mysql limit query as

select * from table_name limit x, y;

where x is the first record and y is the number of records you want to display.

For detail tutorial of mysql limit you can visit the following link Mysql Limit

I hope this may helpful for you.



January 23, 2013 at 12:14 PM


Hmm, well i was thinking of using limit query, but i would have been great if I had got an illutration, if possible then can you provide an illustration with sample code,



Related Tutorials/Questions & Answers:
 

 

 

DMCA.com