deanes02 Posted June 29, 2007 Share Posted June 29, 2007 This one is a bit annoying. I am inputting the integer "200706301725" into a MySQL DB. The field is set up to take int(12). If I put in that integer having 10 numbers then it records it fine in the DB. Once I go over 10 digits it records "4294967295". This number is the same no matter what 11 or 12 digit number i try to input. Am I missing something really simple here or what? Can MySQL only record 10 digits as an integer? Surely not. Any help is much appreciated. Thanks, Steve Quote Link to comment https://forums.phpfreaks.com/topic/57692-solved-inputting-integer-200706301725-but-4294967295-being-recorded/ Share on other sites More sharing options...
bubblegum.anarchy Posted June 29, 2007 Share Posted June 29, 2007 An INT A normal-size integer. The signed range is -2147483648 to 2147483647. The unsigned range is 0 to 4294967295. Try a BIGINT instead A large integer. The signed range is -9223372036854775808 to 9223372036854775807. The unsigned range is 0 to 18446744073709551615. Quote Link to comment https://forums.phpfreaks.com/topic/57692-solved-inputting-integer-200706301725-but-4294967295-being-recorded/#findComment-285650 Share on other sites More sharing options...
AndyB Posted June 29, 2007 Share Posted June 29, 2007 That 'big integer' looks awfully like a date and time. If it is, you may want to reconsider how you generate the values and what you might want to do with them later. Quote Link to comment https://forums.phpfreaks.com/topic/57692-solved-inputting-integer-200706301725-but-4294967295-being-recorded/#findComment-285659 Share on other sites More sharing options...
deanes02 Posted June 29, 2007 Author Share Posted June 29, 2007 Thanks. The BIGINT is the solution. Simple when you know how! Thanks again Quote Link to comment https://forums.phpfreaks.com/topic/57692-solved-inputting-integer-200706301725-but-4294967295-being-recorded/#findComment-285663 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.