[TriLUG] Money in mysql
Matt Frye
mattfrye at gmail.com
Thu Oct 14 05:17:26 EDT 2004
> There's a train of thought amongst some folks that it's best
> to store and calculate "money" amounts as integers, in terms of
> cents, instead of floating point types in terms of dollars.
> Ie, 1 dollar becomes '100' instead of '1.00'. The idea is to eliminate
> the possiblity of rounding errors that can be introduced by conversions
> to and from floating point types, and in floating point arithmetic
> itself.
Good point. I guess I could handle the conversions client-side.
MPF
More information about the TriLUG
mailing list