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:

Dreamweaver noedit ??? (2005) Setting up shop (1997) Virtual Postcards (1998) updating with ProductEditor (1998) creator code (1997) New public beta available (1997) textarea inputs and returns (1999) international time (1997) upload pictures any solution (1999) expired beta (1997) email server and webdna (2006) WebMerchant 1.6 and https (1997) range searching (1998) Can anyone help me with this shipping thing? (1998) WebCatalog for Postcards ? (1997) determining plug-ins? (1998) HELP WITH DATES (1997) Major Security Hole IIS NT (1998) Authenticate (1999) BR (1997)