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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:43:50+00:00 2026-05-23T09:43:50+00:00

Listed on this question: MySQL problem – COMPLETE server overrun! Please advise are all

  • 0

Listed on this question:
MySQL problem – COMPLETE server overrun! Please advise
are all my server details, so I don’t have to re-write them here.

So I’m having a PHP script which interacts with a mysql DB.
2 days ago, due to many requests from my users, I have switched from clasic “select * from table where column like ‘blabla’ and column like ‘lablab'” to the fulltext search.
Indexed, tested, good to go.
2 days on the job, already received a bag of complains.

Searches are indeed better, that is if you use full words… 🙁

try searching for “apple” and you find almost the same results.

try searching for “apple computer at low prices” and the fulltext search is WAY above any LIKE search

try searching for “ple” and you get a full list of results with the classic method… but a big fat “Nothing found” text laying in front of you with the fulltext search…

Sorry for making it sound so poetic up to this point… 😐

Is there any workaround for this? making the fulltext use some freakin’ wildcards? like %foo% should bring me ffoork, flfooor etc…

And for those of you asking, yeah I don’t really know my way around mysql further than syntax, simple expressions and basic functions.

Please help me with a code snippet or link to some method of working this out…
If possible, i would rather not complicate my existence with some 3rd party mysql search engine but as a last resort…

Thank you very much in advance!
Cheers!

Sorry, I forgot to put my code up:

$query="SELECT *, 
    CASE when title like '%".$s."%' then 1 else 0 END as titlematch, 
    CASE when tags like '%".$s."%' then 1 else 0 END as tagsmatch,
    MATCH (title, tags) AGAINST ('".$s."') AS relevance 
    FROM videos  
    WHERE MATCH(title, tags) AGAINST ('".$s."' IN BOOLEAN MODE) 
    HAVING relevance > 0  
    ORDER by titlematch desc, tagsmatch desc, relevance desc, `datetime` desc, `views` desc
    ";
  • 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-23T09:43:51+00:00Added an answer on May 23, 2026 at 9:43 am

    If you are already using boolean mode, you can update your PHP code to automatically add wildcards around the search string inside of AGAINST(...). This should solve your problem for single-word searches.

    You could also add wildcards around each single word in case of multi-word searches, but I’d recommend doing some testing with real data (e.g. commonly searched keywords, if you log them) in order to make sure that current result relevancy is not impacted.


    Update: try the following:

    SELECT
        *, 
        CASE when title like '%".$s."%' then 1 else 0 END as titlematch, 
        CASE when tags like '%".$s."%' then 1 else 0 END as tagsmatch,
        MATCH (title, tags) AGAINST ('*".$s."*' IN BOOLEAN MODE) AS relevance
    
    FROM videos
    
    WHERE
        title like '%".$s."%' OR
        tags like '%".$s."%' OR
        MATCH (title, tags) AGAINST ('*".$s."*' IN BOOLEAN MODE)
    
    ORDER by
        titlematch desc, tagsmatch desc, relevance desc
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem: Event notifications (From COM object - Server) are not received as listed in
I have the same problem as described in the posts listed below. That is,
Ok, I hope I've got everything listed up nicely before posting this question because
This is an architecture question, but its solution lies in ColdFusion and MySQL structure--or
In this question about including all the classes in a directory for an interpreter
Looking through StackOverflow this question seems to be asked a lot, but I have
following on from this question i have the following lists in python which i
I'm looking for opinions and/or suggestions on this question. On our website we have
I overloaded the 6 signals listed on this site http://www.cplusplus.com/reference/clibrary/csignal/signal.html Then i ran my
I'm using this code, and I get the stack trace that is listed below.

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.