
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] Calling all search gurus
Quoting Ed LaFrance (edl@newmediaems.com):
> 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.
Can't really be done with 4.6.x other than a hack which kills performance,
or by manually counting the index position of the fields and doing:
<input type=hidden name=mv_search_field value=":4:6:7:8">
Shades of Minivend 2.
If you are waiting for a reason to update to 4.8, that would be it, for
you can do:
<input type=hidden name=mv_search_field value=":field1:field2:field3:field4">
>
> Thanks in advance for any suggestions!
>
> - Ed L.
>
>
>
> ===============================================================
> New Media E.M.S. Software Solutions for Business
> 463 Main St., Suite D eCommerce | Consulting | Hosting
> Placerville, CA 95667 edl@newmediaems.com
> (530) 622-9421 http://www.newmediaems.com
> (866) 519-4680 Toll-Free (530) 622-9426 Fax
> ===============================================================
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users
--
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH 45013
phone +1.513.523.7621 <mheins@redhat.com>
Nature, to be commanded, must be obeyed. -- Francis Bacon
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users