Re: Rounding
| From: | Jason Wong | Date: | Thu, 08 Apr 2004 02:06:29 +0000 |
| Subject: | Re: Rounding | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-33793@lists.php.net to get a copy of this message | ||
On Thursday 08 April 2004 09:56, Ng Hwee Hwee wrote:
> is there a way to do rounding up to the nearest tenth? can't use ROUND()
> cos i need something like this:
>
> 6.11 --> 6.2
> 6.15 --> 6.2
> 6.19 --> 6.2
> 6.20 --> 6.2
>
> i know there is a ceil() function but that rounds up to the nearest
> integer.. i need one decimal place still..
multiply by 10
ceil()
divide by 10
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
In Oz, never say "krizzle kroo" to a Woozy.
*/