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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:51:48+00:00 2026-05-25T02:51:48+00:00

I have a MySQL database that contains a table called products, with, as an

  • 0

I have a MySQL database that contains a table called products, with, as an example a structure of:

  • product_id
  • name
  • price
  • vendor

Products are imported to the database from a file from each vendor, so for example Vendor 1 might have imported records 1 – 1500, then vendor 2 might have imported records 1500 – 4500, vendor 3 4500 – 5250 and so on.

Each vendor might have multiple types of the same product. Lets use the example of dinner plates. So each vendor might have many different brands and styles of dinner plates.

When a users searches for dinner plates, using a MATCH…AGAINST query I get a lot of results from each vendor, however, the results of the search will be in the same order they are in the database from the vendors, so, I might see a hundred dinner plates from vendor 1 before I even see any dinner plates from vendor 2.

Is there a better approach for displaying the search results if they arent specific so that it mixes up the results a little?

  • 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-25T02:51:49+00:00Added an answer on May 25, 2026 at 2:51 am

    You need to use ORDER BY with an arbitrary column. Sort them by date added, or some other field to give the appearance of random results.

    A rather bad solution to this would be to use ORDER BY RAND(), but note that this would give a different random order every time the page was reloaded.

    Another solution might be to FULLTEXT search (and index) more than one column; this would give a more varied resultset.

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

Sidebar

Related Questions

I'm trying to normalize a mysql database.... I currently have a table that contains
I have a 'price' variable that contains some integer number from a MySQL database.
I have a MySQL database with a table called subm_items The table contains the
I have this MySQl database that has a table which contains a column that
I have a MySQL database table that contains an Article ID ( primary key
I have a table called profile in mysql database Table structure: user | hasimg
I have a MySQL database with a table that contains usernames and passwords. I
I have a mysql database, in there I have 1 table. That table contains
I have a mysql database that has 2 table. the first table contains the
I have this database table that contains emails like 300 records, emails{email,name,join_date); and I

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.