when a interger is larger than 2,147,483,647, views always set it to this value

Comments

dawehner’s picture

I don't think this is views! I think thats your mysql field type.

The number is 2^31 - 1.

I tested it by using

    $value = 2147483647;
    $value ++;

in the numeric field handler.

haojiang’s picture

no , i checked for mysql table , the number there is correct

merlinofchaos’s picture

Status: Active » Closed (won't fix)

It's PHP. PHP cannot handle an int bigger than that number. You have to use a float for numbers bigger than 2,147,483,647.

Stomper’s picture

I think I may be having the same issue when creating an ISBN field. I've tried the ISBN module. I have created an Integer field using a 13 digit integer text field. Every time I save, it is saved as "2147483647" the Marsenne prime.

I think I have to go to a text field or a float field as recommended.

But in this instance phone number or ISBN. Since it is unlikely arithmetic will not be performed on these values, would a text field be better?