search parse?
| From: | Lazor, Ed | Date: | Fri, 14 Jun 2002 22:19:04 +0000 |
| Subject: | search parse? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-102279@lists.php.net to get a copy of this message | ||
Does anyone have a good function for parsing a search string into SQL? I
know it will depend on the name of the field and table I'm searching
through. Anything close will be helpful. An example search string would
be:
beer AND pizza NOT anchovies
and the resulting search string would be
select ID, Title from Products where Title like '%beer%' AND Title like
'%pizza%' AND Title NOT LIKE '%anchovies%';
Another example search string would be:
beer OR pizza AND movies
Thanks! =)
-Ed
****************************************************************************
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
much.