从我的数据库里拿到这个:
252.587254564
我想go 掉.587254564
,保留252
,我该怎么做?
我应该使用什么函数,你能给我举个例子吗?
问候
从我的数据库里拿到这个:
252.587254564
我想go 掉.587254564
,保留252
,我该怎么做?
我应该使用什么函数,你能给我举个例子吗?
问候
您可以使用PHP完成此操作:
round($val, 0);
或者在你的MYSQL声明中:
select round(foo_value, 0) value from foo