How can I increase the max score?

Discussion in 'PHP' started by egdcltd, Aug 22, 2007.

  1. #1
    I have a game where the max points a player can get is 2,147,483,647. I believe this is something to do with how MySQL works. Is there any way of changing this, so higher scores can be got, maybe by using two columns or something?
     
    egdcltd, Aug 22, 2007 IP
  2. bilal@revolutionhosting

    bilal@revolutionhosting Peon

    Messages:
    32
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It sounds like you're using the INT (or INTEGER) data type for that column.
    You can increase the maximum value of that column by either using an UNSIGNED INT (assuming no negative points are used, it will give you a max of ~4 million), or BIGINT, which is some ridiculously large number.

    More information regarding MySQL data types can be found at the following MySQL documentation page:
    http://dev.mysql.com/doc/refman/4.1/en/numeric-types.html
     
    bilal@revolutionhosting, Aug 22, 2007 IP
  3. ssanders82

    ssanders82 Peon

    Messages:
    77
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I'd use BIGINT or you'll have to change again when someone hits 4 million...
     
    ssanders82, Aug 23, 2007 IP