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

The Archive Base Latest Questions

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

I have a string query to search (assuming this is my first query as

  • 0

I have a string query to search (assuming “this is my first query” as an example).

And I am also having a table which consists of (id, title, rating, … ) attributes.

What I want is to find out the search results of my string query which match with “title” attribute (probable or exact both).

But what if complete text i.e. “this is my first query” is not there then there will be no results if I do like

SELECT * FROM test WHERE title LIKE '%$query%';

What I am trying to think next is to fire another query with lesser character this time.. i.e. I will fire the same query using search string “this is my first quer” (y is truncated) and so on until I get my desired no. of results.

But my problem is:

  1. This is very costly operation
  2. I want search data to be sorted in order of descending value of rating ( another field in “test” table)

Please help me out how can I proceed with this ?

  • 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-25T00:30:49+00:00Added an answer on May 25, 2026 at 12:30 am
    1. Add index on this field and run query in loop. I don’t like it.
    2. Use fulltext searching http://dev.mysql.com/doc/refman/5.1/en/fulltext-search.htm in mysql.
    3. Use standalone searching server like Sphinx http://sphinxsearch.com/
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page which expects a numeric query string value. For example: Details.aspx?rgn=1234
I have a query string such as this: file.php?search=keyword+here&genre1=1&genre4=1&genre19=1&genre181&director=436&actor=347&search_rating=3 I need to extract all
I have somebody elses code (C# ASP.Net) which contains the following query: string query
I have a very basic query string which passes a ID to a receiving
i have a form that have a field which hold query for search and
i have table with ten field . i need search query in LINQ that
I have created a method where I can search for string placeholders, this I
i have a string like this: blablablamorecontentblablabla?name=michel&score=5&age=28&iliedabouttheage=true looks like a regular query string yes,
I have a query string called propID and I wanna check if the passed
I have a query string: a=1&b=2&c[1]=3&c[2]=4 etc… I want a NSDictionary where a =>

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.