我有MySQL数据类型decimal(13,6)的数据。我在 php 中过滤这些数据sprintf('%.2f', $number)
当$number填充最后一个正数时如何获取真实数据?还有下面的例子。
例如,使用 sprintf 获取示例输出。
(mysql real value) (filter function)
1.000000 1.00
0.100000 0.10
0.001000 0.001 // only this value geting 0.00 in sprintf('%.2f', $number). We need get 0.001
0.000000 0.00
绝地无双