Open Ameobea opened 8 years ago
+1
0/10 bad
An alternative would be to store all the values as integers. That's how Bitcoin handles all of their transactions as an example (satoshis sent around as integers)
@nii236 that's an interesting idea! Could make certain calculations easier.
It'll be faster and more precise, but you have to remember to convert back and also handle currencies with large denominations (20k Vietnamese Dong (!) to the Dollar for example).
All data stored in the database should be rounded off to an appropriate number of decimals before being stored.