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 [FoundItems] Problem - LONG - (1997) Showif, Hideif reverse logic ? (1997) Hiding HTML and breaking the page (1997) Attention SM: Trigger Bug? (2000) Emailer [cart] file names (1997) [WebDNA] paypal (2009) Time sort - Flushdatabases (2000) Summing fields (1997) Problems passing [SKU] with $Replace in 2.0 (1997) how to use WebCat w. SSL & CyberCash (1998) Formatting ModDate (2000) Email Newsletters (2003) How true is this? (1999) mass mailing (1998) New Plug-in and Type 11 errors (1997) Multiple Pulldowns (1997) Passing Variable (was How to add product size) (1997) international time (1997) preserving the zero's (1999) WebCatalog NT (1996)