Jump to content

[SOLVED] Inputting integer "200706301725" but "4294967295" being recorded


Recommended Posts

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

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.