View Full Version : Zip Code upgrades
January 18th, 2005, 02:07 PM
I had to take off the last ); for the zip codes to install correctly.
January 18th, 2005, 03:56 PM
Also Problem for those in New Englnd
Zip codes start with
02354 for example
A user enters it in & the tables only see it as
2345 & reads no zip code was entered.
January 18th, 2005, 05:32 PM
Try changing line 334 in showcat.php to:
$query = "SELECT lon,lat FROM zipData WHERE zipcode = '".addslashes($zipcode)."'";
January 18th, 2005, 07:46 PM
Sorry line 415 is an image query on mine
Did you mean
$query = "SELECT lon,lat FROM zipData WHERE zipcode = '".intval($prodzipcode)."'";
That didn't work same thing is happening.
January 18th, 2005, 08:08 PM
hmmmm.... I ran a test (without the change above); and its saving the zipcode properly:
Why do you think its not finding the zip code or removing the leading zero?
I made a slight change to the line above, different line number; although it will have no effect, but should be done anyways.
January 18th, 2005, 08:21 PM
Did you try it on the creation of an ad?
It will works fine if a user sees an ad
But it doesn't work when the person posting the zip ad has a zip code that starts with 0.
January 18th, 2005, 08:28 PM
No, but you didn't say anything about creating an ad in your first post, so I wasn't looking there. I "guessed" you meant as a user on the showcat page.
January 18th, 2005, 08:32 PM
Sorry still going through getting familiar with the software only had it for a few days.
January 18th, 2005, 08:43 PM
line 259 in uploadproduct.php change intval to addslashes.
January 18th, 2005, 09:41 PM
My Product tables in mysql just aren't holding any zip codes that start with 0
On the install the structure was
zipcode INT(5) default '0'
On the Zipcode tables the row is
(zipcode varchar(5) NOT NULL default '',
Should they be the same
When I edit an existing product with a zip code that starts with 0 it doesn't hold.
Wen I enter in a new product it doesn't hold.
If I enter in 03245
It just has 3245 in the zipcode row in the Product table.
I tried to enter it manually & it didn't work.
January 18th, 2005, 10:01 PM
We'll have to change the data type to a varchar:
ALTER TABLE products CHANGE zipcode zipcode VARCHAR( 5 ) ;
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.