cdoyle Posted November 27, 2013 Share Posted November 27, 2013 Hello, this has been a topic that has confused me for awhile, and not sure how to get around it. I have an RPG and the players have bank accounts, but after several years of game play. Some players are running into issues where we just can't store large numbers in the database anymore. http://www.caraudiocentral.net/CAC_Mafia_Life I currently have the field as BIGINT(20). I've read that one solution is to use a VARCHAR, but you can't do any math calculations with this. So this isn't a solution for me, since this is game cash, and it has to be calulated everytime a transaction is done. What are my options with these very large numbers? Thanks Chris Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted November 27, 2013 Share Posted November 27, 2013 Is the field set to unsigned? If you don't need negative values, you could switch to unsigned. More information here: http://dev.mysql.com/doc/refman/5.0/en/integer-types.html Quote Link to comment Share on other sites More sharing options...
shiftaction Posted November 27, 2013 Share Posted November 27, 2013 create a new higher currency? Quote Link to comment Share on other sites More sharing options...
cdoyle Posted November 27, 2013 Author Share Posted November 27, 2013 Is the field set to unsigned? If you don't need negative values, you could switch to unsigned. More information here: http://dev.mysql.com/doc/refman/5.0/en/integer-types.html I was just coming back to edit my post to say that it's unsigned currently. Quote Link to comment Share on other sites More sharing options...
requinix Posted November 27, 2013 Share Posted November 27, 2013 (edited) A signed BIGINT at allows values up to nine quintillion, two hundred twenty-three quadrillion, three hundred seventy-two trillion, thirty-six billion, eight hundred fifty-four million, seven hundred seventy-five thousand, eight hundred sevenOr 9,223,372,036,854,775,807. If that's not enough for your currency or whatever then you really need to change the currency. Not even the Zimbabwean dollar is that bad. Edited November 27, 2013 by requinix Quote Link to comment Share on other sites More sharing options...
Barand Posted November 27, 2013 Share Posted November 27, 2013 Looks like my last month's electricity bill Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.