Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002

    Unacceptable rounding in MySQL?

    I was putting some test data into phpMyAdmin (before I write all the PHP code and whatnot), and noticed that a few fields I have as floats... are getting rounded down to 3 decimals; I put four in, and wanted them all. (i.e., 462.5625 becomes 462.562 -- it can't round like this).

    Isn't the whole point of floating point numbers that I don't have to deal with problems like this?

  2. #2
    Join Date
    Jan 2004
    You may want to look at 'double' field

    or decimal(x,y)



  3. #3
    Join Date
    Jan 2003
    You can specify the number of decimal places you want on each side of the . even on single precision values. You can set them as part of the column definition. I would suggest reading the mysql docs, since you may find other column options that will help you.
    Game Servers are the next hot market!
    Slim margins, heavy support, fickle customers, and moronic suppliers!
    Start your own today!

Posting Permissions

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