我需要在表数组输出中舍入 SQL 舍入的结果。我无法弄清楚语法...
$result = mysql_query("SELECT `Energ_Kcal`*`yield`*`qty` AS `cal` FROM allinnot a
WHERE `own_id` = $user->id");
echo "<tr><td>" . $row['Shrt_Desc'] . "</td><td> " . $row['desc'] . "</td><td>" . $row['cal'] . " cal</td></tr>";
cal
返回一个包含许多小数点后数字的值。我只需要它来显示一个整数。我试过 ROUND(),但我一定是把它放错了地方。