Jump to content
Sunamena

Alternative for WHERE?

Recommended Posts

Hello, I want to have something like the WHERE command.

A user types something, for example: "peer".

I want a WHERE that also includes 
"Peer" and "PeEr"  and "apeer" and "Peert.


Is this by any chance possible?



Thanks in advance =D

Share this post


Link to post
Share on other sites

You would have to make the column value and the search value the same case (lower() or upper()) So for example your list of column values will be turned into "peer", "perr", "apeer" and "peert. then using WHERE tableColumnName LIKE '%$needle%' with $needle turned into lowercase search string as well, will find 'peer' from anywhere it is found with text strings from column.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×