Jump to content

WHERE something LIKE 'somethings'


smerny

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.