#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    USA,OH
    Posts
    2
    Rep Power
    0
    I have a table where I place a large integer: for example: 200007014134747 Now it looks algood, until 24hours plus, when I check it it is listed at some -1003045025 (number varies but always this length of digits. I have checked and nothing external is changing this field. Is their some bug in MySQL which I am unaware?

    thanks
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    29
    Rep Power
    0
    What's the column type that you are storing the integer in?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    14
    Rep Power
    0
    You may not have declared your column type properly.
    Declare it as BIGINT 10 UNSIGNED

    You M wasn't big enough or too big for mySQLL
    or more probably you declared it as signed with not enough digits and the next time you called it up, mySQL converted it to its modulo value for the number of digits you specified

    See: http://www.mysql.com/documentation/m...#Numeric_types

    M is the number of digits

    BIGINT[(M)] [UNSIGNED] [ZEROFILL]
    A large integer. The signed range is -9223372036854775808 to 9223372036854775807.
    The unsigned range is 0 to 18446744073709551615. Note that all arithmetic is done using
    signed BIGINT or DOUBLE values, so you shouldn't use unsigned big integers larger than
    9223372036854775807 (63 bits) except with bit functions! Note that -, + and * will use
    BIGINT arithmetic when both arguments are INTEGER values! This means that if you multiply
    two big integers (or results from functions that return integers) you may get unexpected results
    if the result is larger than 9223372036854775807.

    jcbell@magnolia.net

    ------------------
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    USA,OH
    Posts
    2
    Rep Power
    0
    I set the field for bigint(20), I did not specify signed or unsigned, though my number is fixed length at 14-digits (i.e. 20000717101812).

Similar Threads

  1. Replies: 1
    Last Post: February 6th, 2004, 06:53 AM
  2. Inserting from form to multiple tables
    By barth in forum MySQL Help
    Replies: 0
    Last Post: January 25th, 2004, 10:27 AM
  3. Validating a field with multiple criteria...
    By brotherloco in forum Java Help
    Replies: 0
    Last Post: October 29th, 2003, 08:40 AM
  4. Checkbox onclick change text field
    By Jonny5uk in forum HTML Programming
    Replies: 7
    Last Post: June 16th, 2003, 06:25 PM
  5. Appending Data into field in MySQL DB
    By dcuevas in forum MySQL Help
    Replies: 6
    Last Post: June 21st, 2002, 07:30 AM

IMN logo majestic logo threadwatch logo seochat tools logo