Jump to content

Mysql Search


Network_ninja

Recommended Posts

Hi everyone.. pls. help.

 

I don't have yet a working code since i don't have an idea on how to do it. I just want to have a simple search query.

Lets say that if I am going to search for the word 'smith' all firstname that is similar to that will be displayed:

 

eg.

Smithe

Smit

Smiht

 

This is not possible using LIKE since the output would only be Smithe.

 

Tnx in advance.

Link to comment
https://forums.phpfreaks.com/topic/246693-mysql-search/
Share on other sites

tnx for that info... But thats not what I'm looking for:

 

Say I have this value on my table

 

firstname

Smithe

Smith

Smoothe

Smooth

Smithe

 

if i am going to use this query

SELECT * FROM tablename WHERE MATCH
(firstname) AGAINST ('Smith')

 

It would only output :

Smith

 

The desirable output would be

Smithe

Smithe

Smith

 

I am looking for the MYSQL REGULAR EXPRESSION to do the thing but don't have yet come up with a correct one....

Link to comment
https://forums.phpfreaks.com/topic/246693-mysql-search/#findComment-1267219
Share on other sites

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.