Project:Content Construction Kit (CCK)
Version:5.x-1.7
Component:number.module
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

How can i increase max value? whenever i submit 30000000000 the field only save 2147483647

I've already changed mysql field from int(11) to int(12) but no help.

Thanks and Regards

Comments

#1

+1 on this. I just ran into the same problem -- and while I know it has to do with the maximum range of an INT field in mysql (http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html), I'm at a loss for how to fix it.

I changed the field type from INT to BIGINT at the database level, so I can write a larger number directly in mysql, but Drupal still pulls up the that data as 2147483647. Not where where (or if its even possible) to get Drupal/CCK to handle a BIGINT field.

I found (sorta) similar issues at http://drupal.org/node/143933, http://drupal.org/node/198515 and http://drupal.org/node/161042, but no obvious fixes. This page, however -- http://drupal.org/node/159605 -- seems to suggest that BIGINTs can be configured, so I'm hopeful?...

Thanks in advance for any tips!

#2

Priority:critical» normal

For what it's worth, I just went ahead and created a duplicate field that was text, rather than an integer. (So no more number-validation, but also no limit on the number displayed.) That's a pretty weak solution -- but it'll do for now...

I see that Drupal saves decimals as a float -- which, in MYSQL, can also go much larger than 2147483647. But I haven't had a chance to look at how to customise the display of floats, deal with the "rounding errors" that can crop up, etc.

#3

I can not use text for numeric because i think i can not search that field using < or >

CMIIW

#4

Yeah, it's definitely less than ideal -- luckily for me, there were no computations being run on big integer I needed.

Have you tried setting it as a decimal/float, though? Wouldn't that still allow for < and > operations?

#5

Status:active» closed (won't fix)

This is a limitation of the float field used in D5. See #501016: Big numbers (>10,000) get rounded up and other reports. This won't get fixed in D5. D6 has a proper decimal field.

nobody click here