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 6215117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:59:49+00:00 2026-05-24T06:59:49+00:00

How to split the search results into pages? (like page 1, page 2, page

  • 0

How to split the search results into pages? (like page 1, page 2, page 3…)

When the user searches for products on my e-commerce website, I want results to be split into several pages showing around 20 products per page. The search results are the outcome of database query.

For example: If the user searches for Samsung mobiles so my query will be:

SELECT * FROM PRODUCTS WHERE BRAND='SAMSUNG';

Suppose the above query returns 55 results, how to show them into pages (1,2 and 3)?

I am using PHP, MySQL, Apache on Windows machine.

  • 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-05-24T06:59:49+00:00Added an answer on May 24, 2026 at 6:59 am

    The appropriate SQL would be adding:

    LIMIT start, amount
    

    You can navigate like

    search.php?start=20
    

    and then code like:

    LIMIT $start, $amount
    

    with

    $start = intval($_GET['start']);
    

    and

    $amount = 20;
    

    That will result in max 20 records a page.

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

Sidebar

Related Questions

Hi I want to split search results into pages. But I am using different
I have the following scenario. I have a search page which is split into
Word documents are split into pages by default. How do I remove the page
I have site wide search where I put the search results into several Rad
I want some search feature in my website. In the output page, I am
I'd like to split my inbox into separate files (one file per one message)
I want to split a file(suppose a mp3) into four parts.I have tried this
I want to split a series of divs vertically: My HTML might look like
Suppose I wan to search the web pages that contain the links I want.
I'm searching through some database search results on a website & trying to highlight

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.