Jump to content

Recommended Posts

I am trying to use LIKE

 

WHERE something LIKE 'somethings'

 

 

in my case, something is just an example of a field in the database (lets say there is also a value in that table called 'something') and 'somethings' is just an example of a user input. the only tolerance that LIKE seems to be having over the equals sign is case insensitivity?

 

how can i make it tolerant enough to catch, for example.. somethings, something's, some things... will all find 'something'?

Link to comment
https://forums.phpfreaks.com/topic/222104-where-something-like-somethings/
Share on other sites

Can try MATCH ..AGAINST or set up searches in boolean mode for exact phrases.

 

You will need to make fulltext indexes on every field are looking in.

 

http://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html

 

quotes usually are escaped so would have to make exceptions for those, but really those examples you have there are entirely different words as far as a computer see's them.

I feel would have to make association lists to accomplish anything other than what I just showed.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.