Re: Zip Code Search
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 28191
interpreted = N
texte = You can wrap the in coming zip code in a math context. Check to see if hasless than 5 digits, then use the text variable to put the leading zeroback after adding and subtracting 100.[text]_ZIPdata=08504[/text][showif [countchars][math show=f][_ZIPdata][/math][/countchars]<5][mathshow=f]zip_temp1=[_ZIPdata]-100[/math][mathshow=f]zip_temp2=[_ZIPdata]+100[/math][text]variable1=0[zip_temp1][/text][text]variable2=0[zip_temp2][/text][/showif][variable1]
[_ZIPdata]
[variable2]
Technical Support **********************************Smith Micro, Internet Solutions Div | eCommerce (WebCatalog)16855 West Bernardo Drive, #380 | -------------------------San Diego, CA 92127 | Software & Site DevelopmentWebCatalog Support: (858) 675-0632 | http://www.smithmicro.com Fax: (858) 675-0372 *********************************-----Original Message-----From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]OnBehalf Of Clint DavisSent: Monday, February 28, 2000 7:28 AMTo: WebCatalog TalkSubject: Zip Code SearchI have set up a zip code search using the following code:[math show=F]variable1=[_ZIPdata]-100[/math][mathshow=F]variable2=[_ZIPdata]+100[/math][/showif][searchdb=adv_dealers.db&rnZIPdata=[variable1]+[variable2]&_namesort=1&_namesdir=as&[formvariables name=_&exact=F][getcharsstart=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?Thanks,Clint DavisGray Loon Marketing Group812.422.9999cdavis@grayloon.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 -------------------------------------------------------------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:
You can wrap the in coming zip code in a math context. Check to see if hasless than 5 digits, then use the text variable to put the leading zeroback after adding and subtracting 100.[text]_ZIPdata=08504[/text][showif [countchars][math show=f][_ZIPdata][/math][/countchars]<5][mathshow=f]zip_temp1=[_ZIPdata]-100[/math][mathshow=f]zip_temp2=[_ZIPdata]+100[/math][text]variable1=0[zip_temp1][/text][text]variable2=0[zip_temp2][/text][/showif][variable1]
[_ZIPdata]
[variable2]
Technical Support **********************************Smith Micro, Internet Solutions Div | eCommerce (WebCatalog)16855 West Bernardo Drive, #380 | -------------------------San Diego, CA 92127 | Software & Site DevelopmentWebCatalog Support: (858) 675-0632 | http://www.smithmicro.com Fax: (858) 675-0372 *********************************-----Original Message-----From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]OnBehalf Of Clint DavisSent: Monday, February 28, 2000 7:28 AMTo: WebCatalog TalkSubject: Zip Code SearchI have set up a zip code search using the following code:[math show=F]variable1=[_ZIPdata]-100[/math][mathshow=F]variable2=[_ZIPdata]+100[/math][/showif][searchdb=adv_dealers.db&rnZIPdata=[variable1]+[variable2]&_namesort=1&_namesdir=as&[formvariables name=_&exact=F][getcharsstart=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?Thanks,Clint DavisGray Loon Marketing Group812.422.9999cdavis@grayloon.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 -------------------------------------------------------------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
WebDNA Support
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 Set Up (1997)
Pretty relevant (2002)
Finding max value for a field (1997)
won't serve .tpl -index.tpl gone, made test.tpl (2000)
Was code to phantom spacing -- now BBEdit [!][/!] (2001)
Return records from another (1997)
Unknown error: OrderNotCreated (1997)
multi-paragraph fields (1997)
Locking up with WebCatalog... (1997)
Emailer (1997)
[REDIRECT url=http://isd.smithmicro.com/] into New Window? (2002)
Who is doing sign-ups (1998)
WebCatalog2 Feature Feedback (1996)
A Global Variable (1997)
wc 2 pro users - sites, quotes wanted (1997)
[WebDNA] slideshow (2008)
URGENT! ACGI Stopped!!!! (1997)
Foreign Chars ( יאצה and so on) (1998)
acrobat -> wc (1998)
Date problems (1997)