Closed (won't fix)
Project:
Content Construction Kit (CCK)
Version:
5.x-1.7
Component:
number.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 May 2008 at 04:21 UTC
Updated:
28 Jun 2009 at 15:02 UTC
Comments
Comment #1
TKS commented+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!
Comment #2
TKS commentedFor 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.
Comment #3
dindon commentedI can not use text for numeric because i think i can not search that field using < or >
CMIIW
Comment #4
TKS commentedYeah, 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?
Comment #5
karens commentedThis 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.