RE: [PHP-DB] Zip Code Fields

2004-09-08 Thread Justin Palmer
Are you only accepting US zip codes? Justin -Original Message- From: Aaron Todd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 8:36 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Zip Code Fields Just curious, but what kind of field is everyone using to store a Zip Code. I

Re: [PHP-DB] Zip Code Fields

2004-09-08 Thread Chris
With MySQL you could do this: MEDIUMINT(5) UNSIGNED ZEROFILL Most databases (I think) would have an equivalent of this if you're using something else. Chris Aaron Todd wrote: Just curious, but what kind of field is everyone using to store a Zip Code. I set mine to Medium Integer with a max of 5

Re: [PHP-DB] Zip Code Fields

2004-09-08 Thread Micah Stevens
you can store it as an integer, but make sure you use a proper print function to display it later that preserves the 5 digits, such as: echo str_pad($zip, 5, 0, STR_PAD_LEFT); or something like that.. I take it you have no plans to store 10 digit zips? -Micah On Wednesday 08

RE: [PHP-DB] Zip Code Fields

2004-09-08 Thread Dylan Barber
Doesn't the USPS have some online API for checking Zip Codes? Not sure but I thought I read about it somewhere. look here http://www.usps.com/webtools/ -Original Message- From: Justin Palmer [EMAIL PROTECTED] Sent: Sep 8, 2004 12:25 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Zip