Re: search field into MySQL
| From: | dr. Agon | Date: | Fri, 25 Oct 2002 08:30:22 +0000 |
| Subject: | Re: search field into MySQL | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-22681@lists.php.net to get a copy of this message | ||
Did anyone hear about "match against" construction? I is easy to build
this:
$query = "SELECT *, MATCH field AGAINST ('$searchwords') as relev FROM table
ORDER BY relev DESC"
(you need do "ALTER TABLE table ADD FULLTEXT(field)" before.
This could be usefull:
http://detail.phpclub.net/download/search_with_relevance.txt
Regards, A.K.