我面临着一个非常奇怪的错误?现在在mysql + php上.是一个简单的选择,在下面的例子中,我使用多个字段来尝试解释我的问题:
MySQL查询:
select round(field * " . $phpvar . " ,2) as a1,
round(field * 1.15 ,2) as a2,
round(11.5 * " . $phpvar . " ,2) as a3,
round(11.5 * 1.15 ,2) as a4,
field * " . $phpvar . " as a5
from ...
Run Code Online (Sandbox Code Playgroud)
好吧,我想要得到13.23."field" * $phpvar = 13.225,所以使用round(13.225,2)我应该得到13.23,对吗?好吧,是的,不.
查询结果: