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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:19:25+00:00 2026-05-29T08:19:25+00:00

My problem is having symbols used in the search query. I want users to

  • 0

My problem is having symbols used in the search query. I want users to be able to use symbols without being a problem, but the LIKE function in mysql seems to not be the solution so I need some help.

EXAMPLE: If someone searches for “Blue’s car” and “Blues car” is in the database, this query will return with 0 results. OR viseversa, if someone searches for “Blues car” and “Blue’s car” is in the database, this query will return with 0 results as well.

This is an example of what I’m currently using:

("SELECT Title FROM MyData WHERE Title LIKE '%".$search."%'")

Is there another way on providing better search results?

Thanks.

  • 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-29T08:19:26+00:00Added an answer on May 29, 2026 at 8:19 am

    Search Field

    You could have an additional “search” field, that stores the title without punctuation and when user enters search string, strip out punctuation before applying query. You could also remove leading “The”.

    I’ll further explain the above.

    In the database you have a record like this. The SearchTitle is the Title with the leading “The” and punctuation removed:

    Title                  SearchTitle
    ------------------------------------------
    The Blue's Clues       Blues Clues
    

    Here, the user knows the exact title and enters the following search string:

    The Blue's Clues
    

    You strip out the leading “The” and the punctuation, yielding the following:

    Blues Clues
    

    Your query looks like this

    SELECT Title FROM MyData WHERE SearchTitle LIKE '%Blues Clues%'
    

    Here, the user doesn’t know the exact title and enters the following:

    Blues Clues
    

    Stripping the leading “The” and the punctuation, still yields the same thing:

    Blues Clues
    

    Your query stays the same, and matches what’s in the search field:

    SELECT Title FROM MyData WHERE SearchTitle LIKE '%Blues Clues%'
    

    This can be further improved. The key is to apply the same rules to the search string as to what’s stored in the search field. For example, convert “two” and “II”, to “2”, etc., remove additional words like “ON” and “AND”, etc.

    Full-Text Searches

    MySQL FullText searches use “Natural Language” searches. I’m not sure if this would do the trick in your case, but it might be worth researching.

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

Sidebar

Related Questions

I'm having a very simple but nasty problem with mathematica: I need/want to enter
The problem : Having a .h, I want to define real to be double
I know that many people have had this problem... but I am now having
I have found other examples of people having this problem but have had no
I'm having a problem with math symbols (e.g. '∠') displaying too small in firefox.
I'm trying to port a game to iOS but I'm having a problem. I
I'm having a problem making the symbols in the legend of my plot match
I'm having a problem using min() and max() function in my C project. I've
Hey, well I'm having a problem and this weird symbol is showing up â€
I have this problem having to display my jasper report on my grails application.

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.