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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:15:02+00:00 2026-06-18T17:15:02+00:00

I have a search query that looks like this: $sql=SELECT *, MATCH(item_tags, item_name, item_description)

  • 0

I have a search query that looks like this:

  $sql="SELECT *, 
  MATCH(item_tags, item_name, item_description) AGAINST('$serchQuery' IN BOOLEAN MODE) AS score 
  FROM item_list 
  WHERE  `item_display`='1' OR `item_display`='3' AND MATCH(item_tags, item_name, item_description) AGAINST('$serchQuery' IN BOOLEAN MODE) ORDER BY score DESC LIMIT 0, 24";

It works fine (most of the time) but the problem I notice is that when you search a topic with limited results (lets say two), it will show those two first and the a bunch of non relevant ones until the limit is reached.

I want to know if there is a way to change the scoring system so it will determine that the two on top are the most relevant and the remaining are not relevant, so they should not be displayed.

  • 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-18T17:15:03+00:00Added an answer on June 18, 2026 at 5:15 pm

    Well you could try:

    $sql = "SELECT *,
    MATCH (item_tags, item_name, item_description) AGAINST ($serchQuery IN BOOLEAN MODE) AS score 
    FROM item_list 
    WHERE MATCH(item_tags, item_name, item_description) AGAINST('$serchQuery' IN BOOLEAN MODE)  
    HAVING score >= 1
    ORDER BY score DESC LIMIT 0, 24";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple search query that looks like this select * from
I have a query in Delphi using DBExpress TSQLQuery that looks like so ActiveSQL.sql.add('SELECT
I have this sql query: SELECT S.SEARCH, S.STATUS, C.TITLE AS CategoryName, E.SEARCH_ENGINES AS Engine,
I have built a T-SQL query like this: DECLARE @search nvarchar(1000) = 'FORMSOF(INFLECTIONAL,hills) AND
I have this query where I can search the TABLE_GLOBAL_PRODUCTS $catglobal_sql = select p.*,
I have a MySQL table that looks like this: index | tag | posts
I have a database of orders that looks roughly like this ORDER ID |
I have a search form that needs to query another system's SQL Server 2005
I have a database full of users that roughly looks like this: | id
I have a search page like <div class=> <input id=search-input type=text class=input-medium search-query span4>

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.