Re: Trouble Searching

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 22231
interpreted = N
texte = >The database has 3 fields that I am conserned with: num.users.low, >num.users.high and price, so if I enter 19, it should return the record >where 19 is greater than or equal to the num.users.low and 19 is less than >or equal to them num.users.high. This does not work and all and I cannot >find my bug. Dear PCS,I hate to be the one to tell you this, but using ge and le and gr and ls in type=num comparisons FAILS when coded properly. This is a real problem! I just tested this situation to see if Joshua has been coding something wrong, and it seems he is doing everything properly.The le and ge are simply working the OPPOSITE of the way they should be working. If you switch them around in a way that should fail to match any records, it gives you the correct results -- but using them in what appears to be the proper manner always fails to produce the correct results.For testing I used this db:low high 1 100 30 300 50 500... and this template: [search db=test.db&gelowdatarq=[value]&lehighdatarq=[value]&lowtype=num&hightype=num]Correct Code finds [numfound] matches:
[founditems][low]-[high]
[/founditems][/search]

[search db=test.db&lelowdatarq=[value]&gehighdatarq=[value]&lowtype=num&hightype=num]Incorrect Code finds [numfound] matches:
[founditems][low]-[high]
[/founditems][/search]

Done. You can try it yourself with various values, but this is NOT COOL ... :(Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Associated Messages, from the most recent to the oldest:

    
  1. Re: Trouble Searching (The Mooseman 1999)
  2. Re: Trouble Searching (josh@pop-art.com 1999)
  3. Re: Trouble Searching (Bob Minor 1999)
  4. Re: Trouble Searching (Kenneth Grome 1999)
  5. Re: Trouble Searching (Peter Ostry 1999)
  6. Re: Trouble Searching (josh@pop-art.com 1999)
  7. Re: Trouble Searching (PCS Technical Support 1999)
  8. Re: Trouble Searching (josh@pop-art.com 1999)
  9. Re: Trouble Searching (Kenneth Grome 1999)
  10. Trouble Searching (josh@pop-art.com 1999)
>The database has 3 fields that I am conserned with: num.users.low, >num.users.high and price, so if I enter 19, it should return the record >where 19 is greater than or equal to the num.users.low and 19 is less than >or equal to them num.users.high. This does not work and all and I cannot >find my bug. Dear PCS,I hate to be the one to tell you this, but using ge and le and gr and ls in type=num comparisons FAILS when coded properly. This is a real problem! I just tested this situation to see if Joshua has been coding something wrong, and it seems he is doing everything properly.The le and ge are simply working the OPPOSITE of the way they should be working. If you switch them around in a way that should fail to match any records, it gives you the correct results -- but using them in what appears to be the proper manner always fails to produce the correct results.For testing I used this db:low high 1 100 30 300 50 500... and this template: [search db=test.db&gelowdatarq=[value]&lehighdatarq=[value]&lowtype=num&hightype=num]Correct Code finds [numfound] matches:
[founditems][low]-[high]
[/founditems][/search]

[search db=test.db&lelowdatarq=[value]&gehighdatarq=[value]&lowtype=num&hightype=num]Incorrect Code finds [numfound] matches:
[founditems][low]-[high]
[/founditems][/search]

Done. You can try it yourself with various values, but this is NOT COOL ... :(Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Kenneth Grome

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:

Version f1 status (1997) Sorting Numbers (1997) Webstar 1.3.1 PPC (1997) Credit Card Number checking (1997) Multiple security dbs (1997) WebMerchant and Mac Auth Hub Help Please (1999) emailer w/F2 (1997) problems with 2 tags shakur (1997) instant cookies? (1999) Webcatalog and foreign languages (1998) 2.0 Info (1997) Using Plug-In while running 1.6.1 (1997) [WebDNA] macOS 10.13.3 and WebDNA Mac Server 8.5.1 - hick-up (2019) WebCat2 beta 11 - new prefs ... (1997) Database Strategy - more... (1998) Grant, please help me ... (1997) Time to opensource? was [SMSI] WebDNA is too good to (2006) Append command (1999) Bad/GoodPath.inc and value of [cart]? (2000) Custom WebCat Prefs ... (1997)