Re: subtotal
| From: | Elliott Lee | Date: | Wed, 14 Feb 2001 18:24:57 +0000 |
| Subject: | Re: subtotal | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-6631@lists.php.net to get a copy of this message | ||
try
printf("<p>Total : %.2f</p>", round($hoursrow[0], 2);
Elliott
----------
>From: "bryan" <bryan@concept-factory.com>
>To: "db" <php-db@lists.php.net>
>Subject: [PHP-DB] subtotal
>Date: Wed, Feb 14, 2001, 10:55 AM
>
> Good day all...
>
> Does anyone know how, if I have a "*.00" at the, I can just leave that on?
> When I round, it does round,
> but, if I have a total of $13.00, I want it to read ($13.00) not ($13).
>
> here is my weak, but working code...
>
>
****************************************************************************
*********
> ***
>
> $totalsql = "SELECT SUM(total) FROM entry WHERE user_id='$passedid'";
> $totalresult = mysql_query($totalsql);
>
> $totalrow = mysql_fetch_array($totalresult);
>
> print "<P>Total : ".round($hoursrow[0], 2)."</P>";
>
>
****************************************************************************
*********
> **
>
> thanks...
>
>
> Bryan Fitch
> Programmer
> Concept Factory
> bryan@concept-factory.com
> http://www.concept-factory.com
>
>
>