Re: BUG REPORT: numeric ge, le, gr & ls comparisons don't work...
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 22305
interpreted = N
texte = This is not a bug, and in fact works as designed. Remember that somethinglike leHIGHdatarq=35 means find all values in the database whose lowfield is greater than or equal to 35. Since both of your comparisonshave rq at the end, thus making them required, you are essentiallyasking (in the first example) to find all values which are BOTH low>=35 ANDhigh<=35, which is a numeric impossibility with your data set.>Using numeric ge, le, gr & ls comparisons in a search context fail, but>using the opposite comparison gives the correct results when it should>fail. This means webcat is working just the opposite of how it should>work. Try it for yourself with the following test.db and test.tpl page and>you'll see what I mean ...>>Test.db:>>low high>1 100>30 300>50 500>>Test.tpl:>>>[search>db=test.db&gelowdatarq=[value]&lehighdatarq=[value]&lowtype=num&hightype=num]Cor>rect Code finds [numfound]>matches:
[founditems][low]-[high]
[/founditems][/search]
>[search>db=test.db&lelowdatarq=[value]&gehighdatarq=[value]&lowtype=num&hightype=num]Inc>orrect Code finds [numfound]>matches:
[founditems][low]-[high]
[/founditems][/search]>
Done.Technical Support | ==== eCommerce and Beyond ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
Associated Messages, from the most recent to the oldest:
|
- Re: BUG REPORT: numeric ge, le, gr & ls comparisons don't work ... (PCS Technical Support 1999)
- Re: BUG REPORT: numeric ge, le, gr & ls comparisons don't work ... (PCS Technical Support 1999)
- Re: BUG REPORT: numeric ge, le, gr & ls comparisons don't work (Brian B. Burton 1999)
- Re: BUG REPORT: numeric ge, le, gr & ls comparisons don't work ... (Kenneth Grome 1999)
- Re: BUG REPORT: numeric ge, le, gr & ls comparisons don't work... (PCS Technical Support 1999)
- BUG REPORT: numeric ge, le, gr & ls comparisons don't work ... (Kenneth Grome 1999)
|
This is not a bug, and in fact works as designed. Remember that somethinglike leHIGHdatarq=35 means find all values in the database whose lowfield is greater than or equal to 35. Since both of your comparisonshave rq at the end, thus making them required, you are essentiallyasking (in the first example) to find all values which are BOTH low>=35 ANDhigh<=35, which is a numeric impossibility with your data set.>Using numeric ge, le, gr & ls comparisons in a search context fail, but>using the opposite comparison gives the correct results when it should>fail. This means webcat is working just the opposite of how it should>work. Try it for yourself with the following test.db and test.tpl page and>you'll see what I mean ...>>Test.db:>>low high>1 100>30 300>50 500>>Test.tpl:>>>[search>db=test.db&gelowdatarq=[value]&lehighdatarq=[value]&lowtype=num&hightype=num]Cor>rect Code finds [numfound]>matches:
[founditems][low]-[high]
[/founditems][/search]
>[search>db=test.db&lelowdatarq=[value]&gehighdatarq=[value]&lowtype=num&hightype=num]Inc>orrect Code finds [numfound]>matches:
[founditems][low]-[high]
[/founditems][/search]>
Done.Technical Support | ==== eCommerce and Beyond ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
PCS Technical Support
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
taxRate is fine but taxTotal isn't (1997)
Claris HomePage messes up the code (1997)
PCS Customer submissions ? (1997)
Email (1998)
Quickie question on the email templates (1997)
AOL and webcat (1998)
redirect with more than 256 characters (1999)
OT - Extract frames from GIF (2004)
[WebDNA] RSS 2.0 Generator Code (2008)
WebCatalog for Postcards ? (1997)
Large databases in WebCat (1997)
[TaxableTotal] - not working with AOL and IE (1997)
New Command prefs ... (1997)
Configuring E-mail (1997)
Cannot calculate prices (1997)
Unsubscribe (2001)
Nested tags count question (1997)
Auto SKU's (2000)
setting cookies then redirecting? (1998)
HTML tags inside textarea (2000)