Project / Support Center
Welcome, Guest. Please login or register. January 16, 2022, 07:49: PM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  MySQL  |  Topic: Zip Code Storage issue - correct 1st dropped 0 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: Zip Code Storage issue - correct 1st dropped 0  (Read 6789 times)
admin
Guest
« on: August 30, 2012, 04:15: PM »

Zip codes stored in a numeric field will drop the leading 0. Change the field type to varchar(9)

Then run this sql statement

UPDATE MyTable
SET ZipCode = LPAD( ZipCode, 5, '0' );

Change the maroon to your tables name
Change the blue to the field name holding the zip info within your table
Report to moderator   Logged
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  MySQL  |  Topic: Zip Code Storage issue - correct 1st dropped 0 « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!