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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:53:37+00:00 2026-05-25T21:53:37+00:00

My search allows users to search games in my database. The only problem is

  • 0

My search allows users to search games in my database. The only problem is that if a user types multiple terms within the search, it will only get hits if those multiple words are right next to each other.

Example:

searched term = Call Duty Modern

result = none

BUT if they input:

searched term = Call of Duty -or- Modern Warfare

result = Call of Duty Modern Warfare 1/2/3 etc.

here is my mysql query:

$query = "SELECT ID, title FROM games WHERE title LIKE '%{$title}%' AND platform = :platform LIMIT $startFrom,15";
        $statement = $dbG->prepare($query);
        $statement->bindValue(':platform', $platform);
        $statement->execute();
        $gamesLike = $statement->fetch(PDO::FETCH_ASSOC);

I know i should break up each word and search each term but im afraid it would eat up all my programs speed…

are there any specific MYSQL query tweaks i can use to achieve the result i need?

Any suggestions would be greatly appreciated

Thank you for your time

  • 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-25T21:53:37+00:00Added an answer on May 25, 2026 at 9:53 pm

    full text searching is great for this: http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html

    It essentially turns mysql into a search engine where you use match and against to get a rank back of how often the search terms show up in the column you are matching against. It can handle partial matches, multiple matches, excludes words that are small/common to help performance and allows for search keywords/symbols like +some -search will return results that must have some but can’t have search.

    Also it is surprisingly easy to setup as pretty much everything you need works by default.

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

Sidebar

Related Questions

I am working an a search page that allows users to search for houses
Good Morning, I have created an ASP.NET 3.5 webform that allows users to search
I am writing something that will allow users to search through a log of
I have a web application that allows a user to search on some criteria,
(Using MySQL and PHP) I have a search form that will allow my users
I have program that is used by 4000 users to search a large database
I have a search form that allows users to search on several different fields
We have a search feature that allows users to search based on product description.
I have a page in my site that has allows users to search for
I'm developing a basic web form that allows users to search certain columns in

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.