Sean wrote: > Integer is the safer way to represent money - as pennies - > because that way you avoid rounding errors.
Bingo. Sorry I didn't think to mention that last nite. 'twas a bit late for me. I found Sean's point to be especially important when doing very complex multi-user and multi-step calculations where the level of precision is mandated by government regulation - specifically a couple of auto insurance rating systems I built and maintain. The easy answer would be to use mySQL's Decimal field type and set for a precision of, say, 8,2. Cheers, --Matt Robertson-- MSB Designs, Inc. http://mysecretbase.com -----Original Message----- From: Sean A Corfield [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:26 AM To: CF-Talk Subject: Re: mySQL equivalent of MS Access "Money" fieldtype? On Tuesday, Dec 17, 2002, at 07:41 US/Pacific, Stephen Moretti wrote: > INT is INTEGER which means that there's no decimal places.... Not > much good > for real money that I'm afraid. Integer is the safer way to represent money - as pennies - because that way you avoid rounding errors. Financial applications should never use floating point to represent dollars (or whatever). If you take 0.00 and add 0.01 a hundred times, you're quite likely to get something which does not equal 1.00 because of inherent inaccuracies in floating point representation. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm