mySQL data types
I've never had to use mySQL with anything that needed to accuracy as far as money.
I was wondering what data type others would recommend for storing currency values for best accuracy.
-Greg
I've never had to use mySQL with anything that needed to accuracy as far as money.
I was wondering what data type others would recommend for storing currency values for best accuracy.
-Greg
druagord posted this at 14:40 — 24th November 2003.
He has: 335 posts
Joined: May 2003
this will depend on how you treat decimal values for exemple DECIMAL(5,2) will store values from -99.99 to 999.99 5 being the total number of digit to keep (- count as a digit) and 2 being the number of digit after the dot
IF , ELSE , WHILE isn't that what life is all about
Busy posted this at 21:34 — 24th November 2003.
He has: 6,151 posts
Joined: May 2001
another way is double(5,2) does the same as druagords
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.