
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] Calling all search gurus
At 12:38 PM 8/9/2001 -0700, you wrote:
>Hi all -
>
>Using IC 4.6.5 with MySQL. Need to do a form-based search, something like
>this:
>
>mv_search_field="field1,field2,field3,field4"
>mv_searchspec="foo"
>
>mv_search_field="field5"
>mv_searchspec="1"
>
>I need to find all products which have /foo/ in any of the corresponding
>fields, AND do not have '1' in the other field. I thought this would be a
>simple coordinated search:
>
><input type=hidden name=mv_searchtype value=db>
><input type=hidden name=mv_coordinate value=yes>
>
><input type=hidden name=mv_search_field value="field1,field2,field3,field4">
><input type=text name=mv_searchspec value="foo">
><input type=hidden name=mv_column_op value=rm>
><input type=hidden name=mv_numeric value=0>
>
><input type=hidden name=mv_search_field value="field5">
><input type=hidden name=mv_searchspec value=1>
><input type=hidden name=mv_column_op value="!=">
><input type=hidden name=mv_numeric value=1>
>
>..but it does not work. The problem is the multiple search fields in the
>first group - if I search just one field, it works fine - multiple fields
>completely break the search. Somehow I need to tell IC that "foo" in
>field1 OR field2 OR ... etc. is acceptable for the first group - it
>appears to be applying 'AND' logic to the list of fields instead.
>
>Perhaps this can be done with an SQL statement? But I would rather not
>rely on searching products.txt, I prefer to search the db directly.
>
>Thanks in advance for any suggestions!
>
>- Ed L.
OK. Let me give this another shot. :-) Mike Heins helped me with this
exact same thing a while ago (
http://developer2.akopia.com/archive/interchange-users/2001/msg04164.html ).
mv_coordinate=yes
mv_search_field=field5
mv_searchspec=1
mv_search_group=0
mv_orsearch=0
mv_column_op=!=
mv_search_relate=1 AND 2
<!--and-->
mv_search_field=field1
mv_column_op=rm
mv_searchspec=foo
mv_search_group=1
mv_orsearch=1
<!-- or -->
mv_search_field=field2
mv_column_op=rm
mv_searchspec=foo
mv_search_group=1
mv_orsearch=1
<!-- or -->
mv_search_field=field3
mv_column_op=rm
mv_searchspec=foo
mv_search_group=1
mv_orsearch=1
You can even do the above in 4.7 with less verboseness, but hopefully that
will get you started (Though I still personally prefer SQL). HAND,
Dan Browning, Cyclone Computer Systems, danpb@mail.com
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users