Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9084261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:57:28+00:00 2026-06-16T20:57:28+00:00

I have connected to one MySql table to fetch 1000 records that need to

  • 0

I have connected to one MySql table to fetch 1000 records that need to be displayed using JSP. I want to split my table into multiple tables (of size 50) which can be viewed by using next button on jsp page. How can I implement it?

String sql = "select * from people";
PreparedStatement statement = connection.prepareStatement(sql);

ResultSet result = statement.executeQuery();
while(result.next()) {                               // here i get 1000 records. how can i display these records on mulitple jsp pages?
// ... get column values from this record
}

Above gives 1000 records and I use a PreparedStatement.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T20:57:29+00:00Added an answer on June 16, 2026 at 8:57 pm

    Assuming you can fetch the complete table in JSP.

    Just add one more param to the function returning the ROWS COUNTER

    Add COUNTER to LIMIT clause in your QUERY.

    Now you need to keep track of the COUNTER so Update the URL on click on next as

    First Click – URL?pageCOUNTER=1
    Second Click – URL?pageCOUNTER=2

    Fetch the pageCOUNTER varaible from URL and pass it to your function as COUNTER

    And so on. Keep getting you result.

    OR USE JAVASCRIPT TABLE – http://www.datatables.net/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(How long have we been using OpenIDs? I don't seem to have one connected
I have two tables connected with one to many relationship. Parent Table is a
I have a UL list in one div, built using php that retrieves data
I have two set of arrays in different MYSQL table. This what I want
I have created a survey system using php and mysql. I have a table
I have a php file that receives data from mySQL table. The mySQL table
I have this code to connect to mysql and get data from one table
I have a table that get its rows from a MYSQL database <table id=table1>
Possible Duplicate: Remove duplicates using only a MySQL query? I have a table with
So I have this function that takes all the users from an MySql table

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.