I’m creating a table with column of INT(20). Whenever I submit a value greater than 10 characters, the value is scrambled. Anything 10 or less characters as the value is stored properly, and I’m not sure why. I’ve set the length to 20, yet it seems to be ignoring this.
[Char length +10]
Ex: ( 1234567890123 —becomes—> 2147483647 )
[Char length <= 10]
Ex: ( 1234567890 —remains—> 1234567890 )
I’m thinking I may need to changed the structure of the table somehow, but so far nothing has worked. I’d appreciate any helpful words of wisdom to get my numeric values greater than 10 stored properly in my table.
Thanks.
Note: I’m using MySQL, PhpMyAdmin, Drupal
It’s overflowing.
The maximum value of an
INTis 2147483647. You should use aBIGINTinstead ofINT.See the documentation: