[ic] What is wrong with this numeric search?
Ed LaFrance
interchange-users@icdevgroup.org
Fri Aug 23 14:34:18 2002
At 09:37 AM 08/23/2002 -0700, you wrote:
>Can anyone please take a gander at this and tell me why it is not limiting
>the search to quantities less than 200?
>
>[loop
> prefix=FLY
> search="
> fi=tiers
> st=db
> tf=code
> co=yes
> rf=code,tier,quantity,discount,description
> ac=0
> sf=tier
> op=rm
> se=[scratch tier]
> nu=1
> sf=quantity
> op=<
> se=200
>"]
>
>What it appears to be doing is showing me all quantities that begin with a
>character sort value less than two, so I'm seeing all quantities that
>begin with a 1 digit. Below is also a sample of the said table:
>
>code tier quantity description discount
>00100 T1 1 1 to 9 1.00
>00110 T1 10 10 to 24 0.94
>00120 T1 25 25 to 49 0.89
>00130 T1 50 50 to 99 0.85
>00140 T1 100 100 to 199 0.78
>00150 T1 200 200 to 499 0.75
>00160 T1 500 500 to 999 0.71
>00170 T1 1000 1000 to 2499 0.66
>00180 T1 2500 2500 to 4999 0.62
>00190 T1 5000 5000 to 9999 0.57
>00200 T1 10000 10000 to 14999 0.52
>00210 T1 15000 15000 to 24999 0.49
>00220 T1 25000 25000 to 49999 0.46
>00230 T1 50000 50000 to 99999 0.43
>00240 T1 100000 100000 + 0.40
>
>I'm sure this is a case of too much coffee and too little sleep, but I've
>got a deadline at the end of this month of goofy things like this are
>driving me nuts... It seems is the simple stuff I'm really getting screwed
>up on... Anyone?
>
>Barry
The way this search is written, I think that nu=1 is being interpreted to
apply to the field 'tier' instead of 'quantity'. You can just change that
one to nu=0, then add nu=1 to the bottom of the search terms. Give that a
try, or switch to search option arrays:
http://www.icdevgroup.org/cgi-bin/ic/docfly.html?mv_arg=icdatabase06.04
- Ed L.
===============================================================
Increase profits from your Interchange store...
http://www.newmediaems.com/cgi-bin/nm/software_fus.html
===============================================================
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
===============================================================