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

  • Home
  • SEARCH
  • 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 8288613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:18:56+00:00 2026-06-08T12:18:56+00:00

I want to ignore the duplicates in my database when I will set my

  • 0

I want to ignore the duplicates in my database when I will set my “LIMIT 0, 50”, then “LIMIT 50, 50” then LIMIT….. I will need to scan the duplicates on only 1 column of my table, not all the columns at once. I can’t merge the duplicates because they are different in a way : these duplicates have different prices.

more precisely, I will need to show a list of these items, but to show their different prices at their right.

I need a precise number (50) per pages, so I cant load less then go to the next page. I could therefore load more from the beginning (changing the max and previous offsets if i’m on a far page) in a way that if i ignore the duplicates, I will got exactly 50 per pages and I will get the good number of pages shown at the end.

I’m a bit beginner with PHP and I have no idea about how to do that. Maybe pre-scan all the table and then start writing my code, by being flexible with my scan’s variables of LIMIT and everything ? what functions I need ? how ?

Else, do something pre-programmed or a function of php that I don’t know it exists can solve this problem ? Or I really need to get an headhache xD

  • 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-08T12:18:57+00:00Added an answer on June 8, 2026 at 12:18 pm

    I am not entirely certain of what you are asking, but I think you might want to do a aggregate statement along these lines:

    select
        itemID,
        group_concat(itemPrice)
    from
        yourTable
    group by
        itemID
    limit 50
    

    This will bring back a list of 50 items and a second column where all the prices are grouped together. Then in your PHP code, you can either explode() that second column keep it as is.

    Edit: If you select every field, you can’t then use an aggregate function. If you want to select other columns that won’t be different, add them to both the select and the group by sections like this:

    select
        itemID,
        itemName,
        itemSomething,
        itemSomethingElse,
        group_concat(itemPrice)
    from
        yourTable
    group by
        itemID,
        itemName,
        itemSomething,
        itemSomethingElse
    limit 50
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to ignore some of my files (/config/environments/production.rb , /webrat.log , /config/database.yml ).
I want to ignore all the UserWarning in my dev environment so that they
I want to ignore executable files that do not have an extension For example:
Possible Duplicate: regex replace all ignore case I need to replace all occurrences of
I want to ignore the hidden OS X Icon\r file in ido-find-file : $
I want to ignore the post form in the django's internatonalization. I am using
I want to ignore counting the length of characters in the text if there
I mistakenly did bzr ignore For some files that I don't want to ignore.
I am using jQuery validate for client side validation and I want to ignore
I have a form where I've specified onSubmit=validate() , but I want to ignore

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.