[ic] Restricting search to certain fields

Interchange User interchange at framework.cx
Sat Mar 13 13:29:50 EST 2004


> Interchange User [interchange at framework.cx] wrote:
>> I am running IC 5.0 with a text products database.  When I run the
>> code below, it ends up searching all database fields (artist, title,
>> and genre).  So for example, if I type "stone" in the Artist field
>> (hoping to find Rolling STONEs), among the results will be Bob Dylan's
>> "Everybody Must Get STONEd."  What am I missing that will restrict my
>> searches to the desired field only?
>>
>> I have the following code, adapted from the demo at
>>
>> http://www.icdevgroup.org/i/dev/docfly.html?mv_arg=icdatabase06%2e04
>>
> You went straight to the code and missed the text - specifically
> this part, right at the top of the page you quoted:
>
>     Interchange will do a complete range of tests on individual columns
>     in the database.  To use this function, set mv_coordinate to Yes
>     (co=yes in the one-click syntax).
>
> Which means that you need this in your form:
>
>     <input type="hidden" name="mv_coordinate" value="yes">
>
> Going directly to the code isn't a bad thing, but the text sometimes
> helps when the supplied code appears to fail. :-)

LOL.  Thanks.  Actually, the sample code was so identical to my own 
code (I'm doing a record store site - the only change was the demo's 
entry of "category" is actually "genre" in my database) that I thought 
I could get away with it.

Thanks again,

Peter



More information about the interchange-users mailing list