Page 1 of 1

NOTICE:: CivicSpace is Faulty!(zipcode/city/state DB Dump)

Posted: Fri Aug 11, 2006 3:52 pm
by matt1019
Hi Guys,

Just thought i let you guys know that the database table dump of US City/state/zip from civicspace http://civicspacelabs.org/home/developers/download is faulty.

Sorry, I should say "Partly" Faulty.... but faulty nonetheless.

It's missing 00's & 0's from some of the zip codes.

for example, if the zip code has 2 "00's" before any other number (>0) it just displays the zip code in 3 digits. for example, the first INSERT query has the following #:

"210" (NOTICE that its' missing 00 at the beginning)

I have corrected this issue and have uploaded a corrected file...

http://www.upload2.net/page/download/1Z ... s.rar.html

If you have already found a workaround this, then please ignore this post ;)

hope this helps anyone who encountered similar problems

-Matt

Posted: Fri Aug 11, 2006 4:03 pm
by RobertGonzalez
It is not faulty, it is just storing the zip as integers instead of strings. The work around is checking the string length of the ZIP during use of it (or, like I did, make the column a varchar(5) field - varchar(10) for + 4's).

Posted: Fri Aug 11, 2006 4:28 pm
by matt1019
Damnn!!!!!

I used the same file that I uploaded at upload2.net..... samn damn result!

the 00's are omitted!

I changed the column from int to varchar(5). yet the same damn result.... so frustrating!

Everah, can you please suggest a workaround this issue? (I already tried varchar(5) instead of int column type)


thanks,

-Matt

Posted: Fri Aug 11, 2006 4:30 pm
by RobertGonzalez
Hang on, let me see if can get a dump of mine. The reason the change on the column didn't help is because after the type change, you need to add the 00 and 0 to the front of the short zips.

Posted: Fri Aug 11, 2006 4:39 pm
by RobertGonzalez
Ok, I did a dump of my 41K record table. It is at http://www.everah.com/freebies/zipcode_dump.sql. Please take note that this is a massive 2MB file. I didn't feel like Zipping it up, though I can if anyone wants it zipped. FYI, this is the structure...

Code: Select all

CREATE TABLE `zoom_zipcodes` (
  `zc_id` int(11) NOT NULL auto_increment,
  `zc_value` varchar(5) NOT NULL default '',
  `zc_city` varchar(50) NOT NULL default '',
  `zc_state` varchar(2) NOT NULL default '',
  `zc_lat` double(8,6) NOT NULL default '0.000000',
  `zc_lon` double(8,6) NOT NULL default '0.000000',
  PRIMARY KEY  (`zc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Posted: Fri Aug 11, 2006 4:59 pm
by matt1019
Thanks Everah!

-Matt

Posted: Sat Aug 12, 2006 5:20 pm
by feyd
matt, come on man, this did not need another thread.
matt1019 wrote:Hey Guys,

Check this site out if you are into making zip/city/state table

http://www.cfdynamics.com/cfdynamics/zipbase/index.cfm

the site is in Cold Fusion.... but the database comes in two formats:

text version
MS Access version

Not sure How this could be used with php but.... it's here as an alternative for anyone who's looking for one ;)

Hope this helps,

-Matt

Posted: Sat Aug 12, 2006 5:39 pm
by matt1019
Sorry feyd.

my apologies.

I assumed that it had to be another thread :oops:

sorry.

-Matt

Posted: Sat Aug 12, 2006 5:42 pm
by feyd
We're good. Image