Re: Searching Numbers

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 58665
interpreted = N
texte = I'm coming in a little late on this. No. 1 below is you're problem. 1. The eq***datarq looks for an exact match, so you'll never get a match on db fields containing more than one zip code. Only the fields containing one zip code and no spaces would be a match. Leave off the "eq" and just make it ***datarq. Actually, you can leave off the rq if you like since there aren't any other fielddata parameters in the mix. 2. type=num only matters when order or math is important, such as if you're sorting and you want '2' to come before say, '11' or finding a range. In your case, you're just looking for a text string; it doesn't matter if it's letters or numbers. 3. Zip codes are assigned alphabetically, not geographically. Well, yes geographically based on the first 3 digits, but alpha based on the last 2. There are anomalies because towns may change names over time, but look at any zipcode database, and you'll immediately see this pattern. Therefore, a range search would do no good. 4. You might put maxlength=5 in your form field for the zip code so the user doesn't inadvertently get a space in there, or put a zip+4 entry. No need for the [url] tags here; it's just digits going in. Hope this helps. Terry >Message-Id: <6.1.1.1.2.20040627233732.0309ccb0@mail.garykrockover.com> >Date: Sun, 27 Jun 2004 23:46:38 -0500 >From: Gary Krockover >Subject: Re: Searching Numbers >Content-Type: text/plain; charset="us-ascii"; format=flowed > >If you're comparing a 5 digit zip code to values in the database >that arestored as 12345 12345, then you wont get a match since they >don't (fully)equal one another. I don't think a wo search is going >to work as one of the"or" words has to match and again, the 5 digit >zip isn't going to match the5 digit space 5 digit value. Try it, >but don't think it will work. > >You might look at trying: >close to (numeric only). clZipCodedatarq=92069&clZipCodedata=10 >finds allrecords whose ZipCode field is within 10 of 92069 (92059 - >92079) > >begins with (bw). If the 5 digit code always matches the first 5 >digitsthat are stored in the db, this would work. If you might >match on the 2ndset of digits, then this wont work. > >The best option, if possible, would be to break those 5 digit splits >intotwo separate fields. You could then do a range search: ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Searching Numbers (ZIP Code, Distance-based, Store ( David M. Dantowitz 2004)
  2. Re: Searching Numbers (ZIP Code, Distance-based, Store ( David M. Dantowitz 2004)
  3. Re: Searching Numbers ( Gary Krockover 2004)
  4. Re: Searching Numbers ( David Cate 2004)
  5. Re: Searching Numbers ( Terry Wilson 2004)
  6. Re: Searching Numbers ( Brian Fries 2004)
  7. Re: Searching Numbers ( Gary Krockover 2004)
  8. Re: Searching Numbers ( David Cate 2004)
  9. Re: Searching Numbers ( David Cate 2004)
  10. Re: Searching Numbers ( Brian Fries 2004)
  11. Re: Searching Numbers ( Terry Wilson 2004)
  12. Re: Searching Numbers ( David Cate 2004)
  13. Re: Searching Numbers ( Gary Krockover 2004)
  14. Re: Searching Numbers ( "Sal D'Anna" 2004)
  15. Re: Searching Numbers ( David Cate 2004)
  16. Re: Searching Numbers ( "Sal D'Anna" 2004)
  17. Re: Searching Numbers ( Gary Krockover 2004)
  18. Re: Searching Numbers ( David Cate 2004)
  19. Re: Searching Numbers ( Gary Krockover 2004)
  20. Re: Searching Numbers ( David Cate 2004)
  21. Re: Searching Numbers ( Gary Krockover 2004)
  22. Searching Numbers ( David Cate 2004)
  23. Re: searching numbers (PCS Technical Support 1998)
  24. Re: searching numbers (Kenneth Grome 1998)
I'm coming in a little late on this. No. 1 below is you're problem. 1. The eq***datarq looks for an exact match, so you'll never get a match on db fields containing more than one zip code. Only the fields containing one zip code and no spaces would be a match. Leave off the "eq" and just make it ***datarq. Actually, you can leave off the rq if you like since there aren't any other fielddata parameters in the mix. 2. type=num only matters when order or math is important, such as if you're sorting and you want '2' to come before say, '11' or finding a range. In your case, you're just looking for a text string; it doesn't matter if it's letters or numbers. 3. Zip codes are assigned alphabetically, not geographically. Well, yes geographically based on the first 3 digits, but alpha based on the last 2. There are anomalies because towns may change names over time, but look at any zipcode database, and you'll immediately see this pattern. Therefore, a range search would do no good. 4. You might put maxlength=5 in your form field for the zip code so the user doesn't inadvertently get a space in there, or put a zip+4 entry. No need for the [url] tags here; it's just digits going in. Hope this helps. Terry >Message-Id: <6.1.1.1.2.20040627233732.0309ccb0@mail.garykrockover.com> >Date: Sun, 27 Jun 2004 23:46:38 -0500 >From: Gary Krockover >Subject: Re: Searching Numbers >Content-Type: text/plain; charset="us-ascii"; format=flowed > >If you're comparing a 5 digit zip code to values in the database >that arestored as 12345 12345, then you wont get a match since they >don't (fully)equal one another. I don't think a wo search is going >to work as one of the"or" words has to match and again, the 5 digit >zip isn't going to match the5 digit space 5 digit value. Try it, >but don't think it will work. > >You might look at trying: >close to (numeric only). clZipCodedatarq=92069&clZipCodedata=10 >finds allrecords whose ZipCode field is within 10 of 92069 (92059 - >92079) > >begins with (bw). If the 5 digit code always matches the first 5 >digitsthat are stored in the db, this would work. If you might >match on the 2ndset of digits, then this wont work. > >The best option, if possible, would be to break those 5 digit splits >intotwo separate fields. You could then do a range search: ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Terry Wilson

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:

There is a bug in 3.0.1 mac plug-in (1998) [MATH] and Dates (1998) PHP vs WebCatalog (2000) Summing fields (1997) Interfacing WebMerchant to www.fedex.com (1997) Still Stumped on ShowNext...HELP! (1997) shownext (1997) Removing [showif] makes a big difference in speed (1997) Don't tick me off :) [elaspedtime] (1997) Fun with Dates - finally resolved but.... (1997) spaces in [texta] (1998) BBEdit and WebCatalog 2.0? (1997) Fwd: Emailer Error code 530? SMITHMICRO (2002) OLD ORDERS (1998) [showif]/[hideif] question (1997) OT - Mail Solution (2002) Help name our technology! (1997) Cart questions (1997) Nested tags count question (1997) WebCat b13 CGI -shownext- (1997)