Re: Close-to Comparison Code

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17359
interpreted = N
texte = >>>clZipCodedata=98123&clZipCodedata=10 >>> >>>appears to be contradictory; both the starting value 98123 and the >>>range value of +-10 use the same syntax. >> >>This is actually the correct syntax, even though it looks funny. Have you >>set the field to numeric with ZipCodeTYPE=num? That tells it to perform >>numeric comparisons instead of alphabetic. It seems very unusual to me that particular set of search parameters is so uncharacteristic of the way WebCatalog is written. If this were any other set of WebDNA parameters, the proper syntax would be:clZipCodedata=98123&ZipCodeRange=10or ...clZipCodedata=98123&ZipCodeClose=10By the way, nothing in the HTML docs says *anything* about having to add ZipCodeTYPE=num to the search parameters in order to get this to work properly. In fact, the docs seem to suggest just the opposite, since it is clearly pointed out that the close comparison can be used only with numeric values!Here is everything the HTML docs have to say about this:cl close to (numeric only). clZipCodedata=92069&clZipCodedata=10 finds all records whose ZipCode field is within 10 of 92069 (92059 - 92079)By reading this information, I simply assumed that there would be no need to add ZipCodeTYPE=num to this search string -- because WebCat should already know it's dealing with numbers when it sees the cl part of the parameter, right? And putting ZipCodeTYPE=num into the search string is not in the example, either ... >Does that mean that with clZipCodedata=10&clZipCodedata=98123 >the start value is 10 and the range is +- 98123 ???This is a very good question, and if this is true, then it brings up a much more important question:When is the order of the search parameters important -- and when that order is not important?Last month there was a discussion about the order of the parameters in a search context, and Grant said the order doesn't matter ... so I was under the impression that it doesn't makes any difference which order the search parameters appear in ... EVER.So was that true, or is this an exception?And if this is an exception, are there other exceptions as well? Or can we safely ignore the parameter order in every other case EXCEPT for this one?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: Close-to Comparison Code (Larry Hewitt 1998)
  2. Re: Close-to Comparison Code (PCS Technical Support 1998)
  3. Re: Close-to Comparison Code (Laurent Pladys 1998)
  4. Re: Close-to Comparison Code (Kenneth Grome 1998)
  5. Re: Close-to Comparison Code (PCS Technical Support 1998)
  6. Re: Close-to Comparison Code (Larry Hewitt 1998)
  7. Re: Close-to Comparison Code (Kenneth Grome 1998)
  8. Close-to Comparison Code (Larry Hewitt 1998)
>>>clZipCodedata=98123&clZipCodedata=10 >>> >>>appears to be contradictory; both the starting value 98123 and the >>>range value of +-10 use the same syntax. >> >>This is actually the correct syntax, even though it looks funny. Have you >>set the field to numeric with ZipCodeTYPE=num? That tells it to perform >>numeric comparisons instead of alphabetic. It seems very unusual to me that particular set of search parameters is so uncharacteristic of the way WebCatalog is written. If this were any other set of WebDNA parameters, the proper syntax would be:clZipCodedata=98123&ZipCodeRange=10or ...clZipCodedata=98123&ZipCodeClose=10By the way, nothing in the HTML docs says *anything* about having to add ZipCodeTYPE=num to the search parameters in order to get this to work properly. In fact, the docs seem to suggest just the opposite, since it is clearly pointed out that the close comparison can be used only with numeric values!Here is everything the HTML docs have to say about this:cl close to (numeric only). clZipCodedata=92069&clZipCodedata=10 finds all records whose ZipCode field is within 10 of 92069 (92059 - 92079)By reading this information, I simply assumed that there would be no need to add ZipCodeTYPE=num to this search string -- because WebCat should already know it's dealing with numbers when it sees the cl part of the parameter, right? And putting ZipCodeTYPE=num into the search string is not in the example, either ... >Does that mean that with clZipCodedata=10&clZipCodedata=98123 >the start value is 10 and the range is +- 98123 ???This is a very good question, and if this is true, then it brings up a much more important question:When is the order of the search parameters important -- and when that order is not important?Last month there was a discussion about the order of the parameters in a search context, and Grant said the order doesn't matter ... so I was under the impression that it doesn't makes any difference which order the search parameters appear in ... EVER.So was that true, or is this an exception?And if this is an exception, are there other exceptions as well? Or can we safely ignore the parameter order in every other case EXCEPT for this one?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:

Time Tracking (2003) Requiring that certain fields be completed (1997) Field lenght (1998) WC1.6 to WC2 date formatting (1997) test (2003) hidden (phantom) file downloads (2000) PCS Frames (1997) webdna+post+WinIE6 (2004) math on date? (1997) MySQL 5/Float (2007) # fields limited? (1997) Using Plug-In while running 1.6.1 (1997) File Upload, Browser Timeout (2003) [WebDNA] My SQL will not Connect (2020) WebCat2 - storing unformatted date data? (1997) ' add to cart ' or ' sku ' problem (1998) WebCat and HTML/OS (2001) [DOS]/DOS query perhaps OT (2003) No incentive ... (2000) OSX Webcatalog Install (2001)