Funny.  I asked a very similar question the other day.  Jason Morehouse was
nice enough to offer this advice:

If you use fulltext search (assuming you are using MySQL), it deals with
words on its own as well as some additional search logic.


> -----Original Message-----
> From: Scott 'INtense!' Reismanis [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, June 16, 2002 2:36 AM
> Subject: [PHP] Search - 'AND' ... 'OR'
> Hey all,
> I am in the middle of writing a script to allow users to 
> search through
> news archives on my website. Anyhow I am just wondering which 
> logic you
> believe best suits a search.
> i.e. say a user types in 'games AND playstation' then only results
> containing both those words will be returned
> by the same token they could type in 'games OR playstation' 
> then results
> containing either word will be returned
> However if a user does not explicity join there search critiera
> i.e. 'games playstation' what should I assume?
> What would you expect? Google for example wacks an 'AND' 
> inbetween which
> is wise considering they are searching billions of pages 
> however my site
> obviously will only be searching a few hundred so maybe I 
> should assume
> an 'OR'?
> So basically I just am curious to know what you would expect when
> entering multiple critera.
>             Regards,
>                    Scott
This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to