I have an earn site and I would like the user to earn 0.00001 per click
(I know it's under 1p).
What type of column could I use? I have tried int and float but neither works.
解决方案
Use DECIMAL for exact values.
The number 0.00001 has 6 digits. 1 before and 5 after the decimal point. Therefore, it would be represented as DECIMAL(6, 5) (6 digits out of which 5 are after the decimal point). If you would like to have, say, 4 digits before and 5 digits after the decimal point, you'd use DECIMAL(9, 5) (9 in total, out of which 5 are after the decimal point).
Also see: