Jasper Bryant-Greene wrote:

No way. You should *never* use floating-point types for currency if you care about precision. You'll experience all sorts of weird rounding and comparison errors. See [1] for more information.

DECIMAL would suit your needs better -- from [2]: "The DECIMAL and NUMERIC types [...] are used to store values for which it is important to preserve exact precision, for example with monetary data."

[1] http://en.wikipedia.org/wiki/Floating_point
[2] http://dev.mysql.com/doc/mysql/en/numeric-types.html

I see.
Back to the drawing board then. I'm *sure* I saw someone else recommend that ... many years ago now.

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to