MySQL omits my 0 placeholders
I have a MySQL database. I have started storing phone #s in it. The phone number fields are of the INT type. I have 1 phone number split into AREACODE, PREFIX, and SUFFIX. I have a phone # who's suffix is "0986". When I put it in, it turns it into "986", omitting my 0 placeholder. I can't figure out how to prevent this. Any ideas?
|
Change the type from ints? Check you're putting ints in and cast them as ints when removing them, but maybe store them as a string to keep the 0s, or adapt your app to add the leading 0 back.
|
Duh! Yeah I'll just make it a string. Thanks
|
All times are GMT -5. The time now is 08:27 PM. |