Answer the question
In order to leave comments, you need to log in
How to store the exchange rate?
If there are several currencies on the site, how to store the exchange rates correctly? I came to the conclusion that it is necessary to store some of the currencies as a unit, and the rest based on this unit. But what type of data should be used to store the course? As far as I understand, it is better to perform all monetary transactions in an integer data type, because there may be problems when rounding ... Will there be such problems if the rate is stored in DOUBLE, for example?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question