Re: Zip Code Search
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 28195
interpreted = N
texte = On 2/28/00 9:27 am, Clint Davis so noted...>I have set up a zip code search using the following code:>>[math show=F]variable1=[_ZIPdata]-100[/math][math >show=F]variable2=[_ZIPdata]+100[/math][/showif]>[search >db=adv_dealers.db&rnZIPdata=[variable1]+[variable2]&_namesort=1&_names >dir=as&[formvariables name=>_&exact=F][getchars >start=2][name][/getchars]=[url][value][/url]&[/formvariables]startat=[ >startat]]>>This works perfectly for all zip codes except those starting with a >zero. The [math] context drops the leading zero and the search >returns inaccurate results. Example:>>Zip=08085 (New Jersey) returns results for 8085* (Colorado)>>Any ideas on reestablishing the leading zero?How about using [format] to ensure a five-character length padded with zeros?&rnZIPdata=[format .5d][variable1][/format]+[format .5d][variable2][/format]Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to
.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
Associated Messages, from the most recent to the oldest:
On 2/28/00 9:27 am, Clint Davis so noted...>I have set up a zip code search using the following code:>>[math show=F]variable1=[_ZIPdata]-100[/math][math >show=F]variable2=[_ZIPdata]+100[/math][/showif]>[search >db=adv_dealers.db&rnZIPdata=[variable1]+[variable2]&_namesort=1&_names >dir=as&[formvariables name=>_&exact=F][getchars >start=2][name][/getchars]=[url][value][/url]&[/formvariables]startat=[ >startat]]>>This works perfectly for all zip codes except those starting with a >zero. The [math] context drops the leading zero and the search >returns inaccurate results. Example:>>Zip=08085 (New Jersey) returns results for 8085* (Colorado)>>Any ideas on reestablishing the leading zero?How about using [format] to ensure a five-character length padded with zeros?&rnZIPdata=[format .5d][variable1][/format]+[format .5d][variable2][/format]Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .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
Rob Marquardt
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:
no [search] with NT (1997)
Post Limits (1998)
more info on [setlineitems] (1997)
Country & Ship-to address & other fields ? (1997)
searchable list archive (1997)
Multiple cart additions (1997)
Another Excel Problem (2003)
MasterCounter - Does this work?? (1999)
Write to the desktop? (2002)
RE: Error: template (1997)
Delete Context - to remove record (1998)
Speed Optimization - Mac (1997)
Problems with shopping cart (1997)
WebCatalog can't find database (1997)
syntax question, not in online refernce (1997)
Size limit for tmpl editor ? (1997)
WebDNA with Virtual Hosts (2007)
[TaxableTotal] - not working with AOL and IE (1997)
Include a big block of text (1997)
ooops...WebCatalog [FoundItems] Problem - LONG - (1997)