At 09:01 AM 7/29/2004, you wrote:
>Mike Heins wrote:
>>>There is nothing "sql query" about the search. I am talking about:
>>>> <form action="[process href=search]">
>> <input type=text name=mv_searchtype value=text>
>> <input type=text name=mv_searchspec>
>> <input type=submit>
>> </form>
>>>>That is all it takes to full-text search your products.txt files.
>>>>>Should not the mv_searchtype actually be a TYPE=HIDDEN otherwise I ended
>up with two input fields. On changing that, when attempting a search, I
>now then got:
>>> Sorry, the page () was not found
>>The requested page (unspecified error) was not found. You can return to
>browsing our catalog
><http://ebiz.midwest-microwave.com/cgi-bin/mmb2c/main.html>, if you wish.
>>which tells me that it doesn't like the form action. So, I found DB's
>post last month about removing hyphens and changed the form action to
>match his example, which was also my original form statement:
>><form action="[area search]" method=post>
>>and it appears to work, though it doesn't appear to search 'all'
>columns. That aside for a moment, I still have a problem in that I must
>be able to AND test the searches so that results for inactive or out of
>territory parts to not return. For example, when I reinsert any code for
>coordinating a search based on allowed regions, all return results fail:
>> <form action="[area search]" method=post>
> <INPUT TYPE=hidden NAME=mv_coordinate VALUE=1>
> <INPUT TYPE=hidden NAME=mv_sort_field VALUE=category,sku>
> <INPUT TYPE=hidden NAME=mv_search_field VALUE=[scratch
> AllowGroup]>
> <input type=hidden name=mv_substring_match value=0>
> <INPUT TYPE=hidden NAME=mv_column_op VALUE=eq>
> <INPUT TYPE=hidden NAME=mv_searchspec VALUE=X>
> <input type=hidden name=mv_searchtype value=text>
> <input type=text name=mv_searchspec>
> <input type=submit>
> </form>
>>and I'm presuming this is because the prior mv_search_field is mucking up
>the overall mv_searchtype=text operation but adding the additional
>parameters for a coordinated search didn't change the results, nor did
>trying an asterisk for the mv_search_field for the last mv_searchspec pairing:
>> <form action="[area search]" method=post>
> <INPUT TYPE=hidden NAME=mv_sort_field VALUE=category,sku>
> <INPUT TYPE=hidden NAME=mv_coordinate VALUE=1>
> <INPUT TYPE=hidden NAME=mv_search_field VALUE=[scratch
> AllowGroup]>
> <input type=hidden name=mv_substring_match value=0>
> <INPUT TYPE=hidden NAME=mv_column_op VALUE=eq>
> <INPUT TYPE=hidden NAME=mv_searchspec VALUE=X>
> <INPUT TYPE=hidden NAME=mv_search_field VALUE=*>
> <input type=hidden name=mv_substring_match value=1>
> <INPUT TYPE=hidden NAME=mv_column_op VALUE=rm>
> <input type=text name=mv_searchspec>
> <input type=hidden name=mv_searchtype value=text>
> <input type=submit>
> </form>
>>Is this a situation of having my cake and not being able to eat it too?
>Can you point me to the docs page that actually discusses this so that I
>can read and better understand the intent of the implementation? I see
>that this feature dates back very far, but looking through the archives,
>I've also found a lot of variations to use this without luck as well as
>passed parameters that I've never seen...
I would recommend the fulltext search feature of MySQL. It allows you to
create a composite index of the fields you want to scan, which is
automatically maintained my MySQL once created. You can then do keyword
searches within that composite index (boolean operators are supported in
MySQL 4.x, allowing substring matches and other fun stuff), supplemented
with ANDs and ORs of searches in other distinct fields as needed. Yep, it's
a bit of work, but worth it, and the documentation at mysql.com on this is
very good. Have fun!
- Ed
===============================================================
New Media E.M.S. Technology Solutions for Business
11630 Fair Oaks Blvd., #250 eCommerce | Consulting | Hosting
Fair Oaks, CA 95628 Ed.LaFrance at newmediaems.com
(916) 961-0446 http://www.newmediaems.com
(866) 519-4680 Toll-Free (916) 961-0447 Fax
===============================================================