Re: anyone trickier than 'LIKE' ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have this data (eg.) "..........big fat buddy......." on the database . If
a person enter "big buddy" in the search form , the ".......big fat
buddy........." data will not be found . Any suggestion ?
select * from table where data like "%keywords%";

You can break up the search terms into words and do ...data LIKE '%$keyword[0]%' OR data LIKE '%$keyword[1]%'...

This will be slow though. You could also do full text searches if you are using MySQL. Have good indexes for whichever route you go.

Larry

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux