How to search for obtaining the "best" result

Posted by stighy on Stack Overflow See other posts from Stack Overflow or by stighy
Published on 2010-06-16T20:11:35Z Indexed on 2010/06/16 20:22 UTC
Read the original article Hit count: 221

Filed under:
|

Hi guys, suppose someone enter this search (on an form):

Nicole Kidman films

Which SQL i can use to find "the best" results ?

I suppose something like this :

SELECT * FROM myTable WHERE ( Field='%Nicole Kidman Films%' OR Field='%Nicole%' OR Field='%Kidman%' OR Field='%Films%' ) 

My question is how to get most relevant result ? Thank you very much!

© Stack Overflow or respective owner

Related posts about sql

Related posts about search