PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Classifieds Bug Reports (http://www.photopost.com/forum/classifieds-bug-reports/)
-   -   Zip Code upgrades (http://www.photopost.com/forum/classifieds-bug-reports/111594-zip-code-upgrades.html)

Olney January 18th, 2005 02:07 PM

Zip Code upgrades
 
I had to take off the last ); for the zip codes to install correctly.

Olney 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.

Michael P January 18th, 2005 05:32 PM

Try changing line 334 in showcat.php to:

$query = "SELECT lon,lat FROM zipData WHERE zipcode = '".addslashes($zipcode)."'";

Olney 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.

Michael P January 18th, 2005 08:08 PM

hmmmm.... I ran a test (without the change above); and its saving the zipcode properly:

zipcode
06076
www.viperalley.com/classifieds/
1536
2508244224
29693256
4139935584
29687221

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.

Olney January 18th, 2005 08:21 PM

Did you
 
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.

Michael P 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.

Olney January 18th, 2005 08:32 PM

Sorry still going through getting familiar with the software only had it for a few days.

Michael P January 18th, 2005 08:43 PM

line 259 in uploadproduct.php change intval to addslashes.

Olney 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.

Michael P 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 ) ;


All times are GMT -5. The time now is 03:15 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97