> I am fairly confident that in this particular case the opinion(s)
contained within this email would nicely coincide with those of St. Jude
Children's Research Hospital.
>
> We live in a world full of geometry.
>
> Ignatius Reilly
... Not to be outwitted ...
I'm quite certain my statements in t
Brent Baisley wrote:
round()
rtfm.
I would agree, rtfm is a good choice in this regard but the wrong rtfm.
This is something that should be done IN the database not in PHP. If you
are using PostgreSQL you can do this:
select column::numeric(10,2) from foo;
Sincerely,
Joshua D. Drake
On Nov 16,
ot;Norland, Martin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 16 November 2004 22:21
Subject: RE: [PHP-DB] Numeric question
> Just a quick question, I'm having to calculate some values from an
existing database,
> but on some of the results I get (For example)
round()
rtfm.
On Nov 16, 2004, at 3:38 PM, Chris Payne wrote:
Hi there everyone,
Just a quick question, I’m having to calculate some values from an
existing
database, but on some of the results I get (For example)
0.5907
How can I limit the result to only 2 digits after the decimal poi
$number = 0.5907;
Round($number,2);
YAY!
:)
-TG
> -Original Message-
> From: Chris Payne [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 16, 2004 3:38 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Numeric question
>
>
> Hi there everyone,
>
>
>
> Just a quick ques
> Just a quick question, I'm having to calculate some values from an
existing database,
> but on some of the results I get (For example)
> 0.5907
> How can I limit the result to only 2 digits after the decimal point
with PHP?
> Thanks
> Chris
Let the manual guide you: http://www.php.net/ro