Steve:

This is most likely in the server-side scripting language ... I've never
seen MySQL round off numbers.

If you are using PHP, you want to do something like:
    $price = round($price, 2);

To get fancy, and show it as currency:
    $price = "$".$price;

Gerald Jensen


----- Original Message -----
From: "pc" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 17, 2001 11:15 AM
Subject: Formatting Price Field in my Table so 0.20 does not become 0.2....


> Hi people,
>
> Anyone know how to get a field in one of my table in a form that any
number
> that I want to be displayed as 0.20 doesn't round off as 0.2? So 0.20 for
> the cost instead of 0.2?
>
> Or do I have to do this with the Server Side Language I'm using to format
> the value? Or some extra SQL command?
>
> Thanxs
>
> Steve Griff
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to