[ic] Search routine
Barry Treahy, Jr.
interchange-users@icdevgroup.org
Wed Jan 29 11:44:00 2003
Martin Abell wrote:
>I have a question about a search. First let me say that I did try the
>searchable archive and it came up with some promising hits, but the
>drill-down to an article gave 404 errors (rejection from RedHat). So is
>there another way to do this?
>
>The search I'm attempting is to find the word(s) typed in the search field
>within some of the product db fields (description, comment, sku, price) but
>eliminate any in the "specials" category. (There is no "specials" category
>in the cat db, but some items in the products db have category = specials.)
>In other words, we want to keep the casual visitor from finding the
>specials.
>
>Here's what I tried:
>
><FORM ACTION="[area search]" method="post">
> <INPUT TYPE=hidden NAME=mv_searchtype VALUE=sql>
> <INPUT TYPE=hidden NAME=mv_matchlimit VALUE=4>
> <INPUT TYPE=hidden NAME=mv_sort_field VALUE=category>
> <INPUT TYPE="hidden" NAME="mv_search_page" VALUE="results_big">
>
> <input type="hidden" name="mv_coordinate" value="yes">
>
> <input type="hidden" name="mv_search_field" value="category">
> <INPUT TYPE="hidden" NAME="mv_column_op" VALUE="rn">
> <input type="hidden" name="mv_substring_match" value="no">
> <INPUT type="hidden" name="mv_searchspec" value="special">
>
> <INPUT TYPE="hidden" NAME="mv_search_field"
> VALUE="sku,description,comment,price">
> <INPUT TYPE="hidden" NAME="mv_column_op" VALUE="em">
> <input type="hidden" name="mv_substring_match" value="yes">
> <INPUT MAXLENGTH=30 NAME="mv_searchspec" type=text size=10>
> (submit button)
></form>
>
>
I can't say without any doubt, but I suspect what is bitting you is that
you are mixing the individual listing of the fields in the
MV_SEARCH_FIELD along with the combined search, which I also believe you
have stated incorrectly. Unless I'm mistaken, I thought that the
multiple fields were delimited with a colon, not a comma, so you could
start by changing that. If that still fails, you could use the initial
search page to gather the search spec and then on the next page, do a
SQL loop so that you can precisely pull what you want or don't want from
the tables...
Barry
--
Barry Treahy, Jr * Midwest Microwave * Vice President & CIO
E-mail: Treahy@mmaz.com * Phone: 480/314-1320 * FAX: 480/661-7028