Re: Searching a db
| From: | Joseph Szobody | Date: | Mon, 23 Sep 2002 18:30:18 +0000 |
| Subject: | Re: Searching a db | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117307@lists.php.net to get a copy of this message | ||
Joshua,
I learned a ton by reading this tutorial. See if it helps...
http://www.zend.com/zend/tut/tutorial-Ferrara.php
Joseph
"Joshua E Minnie" <josh@acsurf.net> wrote in message news:20020923170943.39650.qmail@pb1.pair.com...
> Hey all,
> I am looking for a way to search a MySQL DB based on a users input
> string. The string would be searched on particular fields in my DB, which
> is already setup. The problem I am having is that I want to be able to
> return strings that match all *or* part of their string. Right now it only
> returns exact (case-insensitive) matches. But I want to be able to return
> partial matches as well. I have the relevancy calculation worked out but
> I'm not sure how to go about gathering the partial matches.
>
> i.e.
>
> User inputs: Christmas
> Output would be something like:
>
> Christmas (100%)
> Christian (67%)
> Christy (67%)
> Chandelier (20%)
>
> Anything below 10% will not be displayed. I am using a class I found at
> phpclasses.org called better_field_search. I am looking to modify it to fit
> my needs but I'm not sure how to go about it. If anyone has done anything
> similar, I would greatly appreciate any help or direction provided.
>
>
> --
> Joshua E Minnie
> Advantage Computer Services, LLC
> Senior Project Manager
> josh@acsurf.net
> Phone: 269.276.9690
> Fax: 269.342.8750
>
> "Don't work for recognition, but always do work worthy of recognition."
>
>