Saving Bitcoin data in Mysql
Results 1 to 2 of 2

Thread: Saving Bitcoin data in Mysql

  1. #1
    Junior Member
    Join Date
    Jan 2001
    Location
    Trinidad
    Posts
    5

    Saving Bitcoin data in Mysql

    Hi Guys,

    I am trying to save Bitcoin data in Mysql. But I am struggling to identify a reliable data format that won't round out or misrespresent the original value.

    Data Formated I tested

    decimal(20,20)
    double(20,20) --> got converted to decimal(20,20)
    float(20,20)

    I tried to save this value 123456789,123456789
    But it always got rounded out or misrepresented.

    Results
    decimal(20,20) --> 0.99999999999999999999
    double(20,20) --> 0.99999999999999999999
    float(20,20) --> 1.00000000000000000000
    VarChar will work but I won't be able to do calculations within Mysql.

    Any suggestions?

  2. #2
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Systems Vehicle "Thrilled To Be Here"
    Posts
    21,855
    The first part of the decimal specification is the precision - the number of digits stored including those used for places after the decimal point. decimal(20,20) means twenty-digit numbers, with twenty of them after the decimal point.
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •