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 high1 10030 30050 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 Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Associated Messages, from the most recent to the oldest:
>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 high1 10030 30050 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 Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://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:
Emailer error codes (1999)
Securing a Directory (2000)
Not exercising the code as much as in other betas (2000)
free zip codes database (1999)
Problems with Frames (1998)
cart ID (1998)
Problems passing [SKU] with $Replace in 2.0 (1997)
Sub Categories (2000)
WebCat & WebTen (1997)
Listserver problem (1997)
Running subtotal? (1998)
Formatting a .txt file (1998)
Email within tmpl ? (1997)
DB server instead of Webcat service (2005)
WebCat2 - Getting to the browser's username/password data (1997)
[WebDNA] macOS High Sierra (2017)
Re:Change WebDNA-Talk Mail due to no digest for 1wk (1997)
WCS Newbie question (1997)
Nested search (1997)
Unable to view next 101-200 (1997)