multiple words search query advise
| From: | Ryan A | Date: | Mon, 21 Mar 2005 11:39:01 +0000 |
| Subject: | multiple words search query advise | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-211162@lists.php.net to get a copy of this message | ||
Hi,
We have an a auction like site, now we have to add a search feature to the
site, the searching will be done for 2 fields:
subject and description (ad_sub, ad_text).
Since i have never done this before, I would appreciate some advise on how
to do it.
I was thinking of getting the search string, running an explode() on it and
then doing a LIKE sql query to get the results on each word...but then that
would add up to quite a bit if even 5 words were written (5 queries each for
the subject and 5 for the text)
Any help in the form of advise, links, code, examples etc would be
appreciated.
After googleing a bit I have gotten a bit of help from some of the pages but
not much, one very helpful bit of advise i got was to ignore works like:
the, a, in
as they are too common...if you have anymore to add, please feel free to
write it.
Thanks in advance,
Ryan
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005