Software Design
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreSoftware Design

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 1st, 2010, 11:31 AM
groghscv groghscv is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2005
Posts: 117 groghscv User rank is Lance Corporal (50 - 100 Reputation Level)groghscv User rank is Lance Corporal (50 - 100 Reputation Level)groghscv User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 16 h 13 m 14 sec
Reputation Power: 8
Zip

Working on a project that I want to be able to enter a zipcode into and see whether or not someone offers a service in the area. I am guessing the simplest way to do this would be a simple if/else to search through a database to see if the zipcode entered exists on a list. I have not chosen a design language yet. It's going to either be php or C#.net. I have never done anything with zipcodes so I'm debating on what stlye code would make this easiest and whether to hard code the zip codes or just have a database table with a list of the "good" zipcodes. If you have suggestions I'd appreciate any insight! Thanks

Reply With Quote
  #2  
Old November 2nd, 2010, 02:17 PM
medialint's Avatar
medialint medialint is offline
Type Cast Exception
Dev Shed God 20th Plane (14500 - 14999 posts)
 
Join Date: Apr 2004
Location: OAKLAND CA | Adam's Point (Fairyland)
Posts: 14,938 medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)  Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 6 Months 2 Weeks 2 Days 26 m 49 sec
Reputation Power: 8490
Facebook
Quote:
I am guessing the simplest way to do this would be a simple if/else to search through a database to see if the zipcode entered exists on a list.


You mean

Code:
If zip = 94610 Then
  //
ElseIf zip = 94105 Then
 //
ElseIf 
 // ad nauseum


?

How about

Code:
SELECT * FROM MyData WHERE zipcode = 94610;


I believe some government agency and/or the US postal service might have data you can use.
Comments on this post
groghscv agrees!
__________________
medialint.com

“Today you are You, that is truer than true. There is no one alive who is Youer than You.” - Dr. Seuss

Reply With Quote
  #3  
Old November 2nd, 2010, 02:42 PM
groghscv groghscv is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2005
Posts: 117 groghscv User rank is Lance Corporal (50 - 100 Reputation Level)groghscv User rank is Lance Corporal (50 - 100 Reputation Level)groghscv User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 16 h 13 m 14 sec
Reputation Power: 8
That's kinda the idea I was going after. My concern is collecting all that data. Like you said, maybe one of the .gov sites can give me that list. The SQL method is probably the simplest because you just need a list of supported zip codes and if it is not in the DB table you dump the user to a page saying "this service is not available in your area" or something like this. Thanks for the reply. It gives me something else to think about.

Reply With Quote
  #4  
Old November 2nd, 2010, 07:06 PM
medialint's Avatar
medialint medialint is offline
Type Cast Exception
Dev Shed God 20th Plane (14500 - 14999 posts)
 
Join Date: Apr 2004
Location: OAKLAND CA | Adam's Point (Fairyland)
Posts: 14,938 medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)  Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 6 Months 2 Weeks 2 Days 26 m 49 sec
Reputation Power: 8490
Facebook
Actually a list of zip codes, unless you're looking for proximity data, shouldn't be required. You have a list of service providers and their zip codes presumably if that's what you're searching, you don't need a lookup list. If you want a database that does proximity data I think you're going to have to license this.

I once did a work related project (so I can't share) that tapped terraserver and used GPS coordinates and great circle distance calculation to calculate the distance between two street addresses. You could license terraserver data and do similar. I could tell you how, I just can't share my code since even though I wrote it, it's not mine.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreSoftware Design > Zip

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap