I\'m facing a really weird ¿bug? on mysql+php right now. Is a simple select, in the following example i\'m using multiple fields to try to explain my problem:
The problem is how the DOUBLE and FLOAT values are stored.
It is possible (and probable) that values like 11.5 or 22.475 coul be stored in approximated values like 11.499999999999~ or 22.475000000000000001 thus some calculations or roundings could lead to incorrect results.
It is always better to store float values into a DECIMAL coulmn type where the value is stored exactly with all the decimal digits and is not approximated.