File: icdatabase_28.html

package info (click to toggle)
interchange-doc 4.8.3-1
  • links: PTS
  • area: main
  • in suites: sarge, woody
  • size: 17,396 kB
  • ctags: 4,509
  • sloc: makefile: 46
file content (52 lines) | stat: -rw-r--r-- 3,282 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!doctype html public "-//W30//DTD W3 HTML 2.0//EN">

<HTML>

<!-- This file was generated using SDF 2.001 by
     Ian Clatworthy (ianc@mincom.com). SDF is freely
     available from http://www.mincom.com/mtr/sdf. -->

<HEAD>
<TITLE>Interchange Databases: Range Searching</TITLE>
</HEAD>
<BODY BGCOLOR="ffffff" LINK="993333">

<DIV CLASS="header">
<DIV CLASS="navigate">
<P ALIGN="Center"><A HREF="icdatabase_22.html">Parent Topic</A> | <A HREF="icdatabase_27.html">Previous Topic</A> | <A HREF="icdatabase_29.html">Next Topic</A> <BR><A HREF="../index.html" TARGET="_top">Catalog</A></P>
</DIV>
</DIV>
<DIV CLASS="main">
<H2>4.6. Range Searching</H2>
<P>Range searching allows qualification of search returns with a field that must be within a certain numeric or alphanumeric range. To use it, set the <TT>mv_range_look</TT> variable to the products database field, or a column/field number for another file. Then, set the corresponding <TT>mv_range_min</TT> and <TT>mv_range_max</TT> variables with a selectable field.</P>
<PRE>
   &lt;INPUT TYPE=&quot;hidden&quot; NAME=&quot;mv_range_look&quot; VALUE=&quot;price&quot;&gt;
       Search on Price
   Min &lt;SELECT NAME=&quot;mv_range_min&quot;&gt;
            &lt;OPTION value=0 SELECTED&gt; Free
            &lt;OPTION value=1000000&gt; $1,000,000
            &lt;OPTION value=10000000&gt; $10,000,000
            &lt;OPTION value=20000000&gt; $20,000,000
            &lt;OPTION value=40000000&gt; $40,000,000
       &lt;/SELECT&gt;&lt;BR&gt;
   Max &lt;SELECT NAME=&quot;mv_range_max&quot;&gt;
           &lt;OPTION value=0 SELECTED&gt; no object
           &lt;OPTION value=1000000&gt; $1,000,000
           &lt;OPTION value=10000000&gt; $10,000,000
           &lt;OPTION value=20000000&gt; $20,000,000
           &lt;OPTION value=40000000&gt; $40,000,000
       &lt;/SELECT&gt;
</PRE>
<P>The value of 0 for <TT>mv_range_max</TT> is equivalent to infinity if doing a numeric search. This makes it impossible to search for a ceiling of 0 with a negative <TT>mv_range_min</TT>.</P>
<P>The fields are stackable, so more than one range to check can be set. The order is significant, in the sense that the array of field names and minimum/maximum values must be kept in order to achieve correspondence.</P>
<P>The optional <TT>mv_range_alpha</TT> specification allows alphanumeric range matching for the corresponding field. If it is set, and the fields are stacked, they must all be set. The <TT>mv_case</TT> field does apply if it is set. Otherwise, the comparison is without regard to case.</P>
<P>If ONLY a range search is required, all lines with <TT>mv_return_all</TT>=yes must be selected in order to make the search operate. Range-only searches will be quite slow for large databases since every line must be scanned. It should be quite usable for catalogs of less than 10,000 items in size on a fast machine. Using it in combination with another search technique (in the same query) will yield faster search returns.</P>
</DIV>
<DIV CLASS="footer">
<DIV CLASS="navigate">
<P ALIGN="Center"><A HREF="icdatabase_22.html">Parent Topic</A> | <A HREF="icdatabase_27.html">Previous Topic</A> | <A HREF="icdatabase_29.html">Next Topic</A> <BR><A HREF="../index.html" TARGET="_top">Catalog</A></P>
</DIV>
</DIV>

</BODY>
</HTML>