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 something like leHIGHdatarq=35 means find all values in the database whose low field is greater than or equal to 35. Since both of your comparisons have rq at the end, thus making them required, you are essentially asking (in the first example) to find all values which are BOTH low>=35 AND high<=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 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: BUG REPORT: numeric ge, le, gr & ls comparisons don't work ... (PCS Technical Support 1999)
  2. Re: BUG REPORT: numeric ge, le, gr & ls comparisons don't work ... (PCS Technical Support 1999)
  3. Re: BUG REPORT: numeric ge, le, gr & ls comparisons don't work (Brian B. Burton 1999)
  4. Re: BUG REPORT: numeric ge, le, gr & ls comparisons don't work ... (Kenneth Grome 1999)
  5. Re: BUG REPORT: numeric ge, le, gr & ls comparisons don't work... (PCS Technical Support 1999)
  6. 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 something like leHIGHdatarq=35 means find all values in the database whose low field is greater than or equal to 35. Since both of your comparisons have rq at the end, thus making them required, you are essentially asking (in the first example) to find all values which are BOTH low>=35 AND high<=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 | Typhoon 619/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:

WebCatalog dying in NT (1998) another problem (1997) [showif] or-ing (1999) WebCat2b12 CGI Mac -- Problems propagating the cart through (1997) Sendmail truncation in Eudora Clients (1998) Intermitent problem using [referrer] (1997) Return records from another (1997) WebCat2 beta FTP site (1997) Country & Ship-to address & other fields ? (1997) [thisurl] file name? (1999) What am I missing (1997) Just Testing (1997) Webstar 1.3.1 PPC (1997) [Announce] Newest Commerce Site based on WebCatalog (1997) Check boxes (1997) WebCat2.0 [format thousands .0f] no go (1997) Criticism of WebCatalog: Keep It Coming! (1998) WebCatalog for guestbook ? (1997) [shownext] and descending order (1997) WebCat2b15MacPlugIn - [authenticate] not [protect] (1997)