Re: decimal point
| From: | Micah Stevens | Date: | Sun, 16 Dec 2007 03:58:48 +0000 |
| Subject: | Re: decimal point | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44416@lists.php.net to get a copy of this message | ||
If I make a test table with a field that is DECIMAL(4,2), I can:
INSERT INTO
testaa ( a )
VALUES (
'8.00'
)
Then I can
SELECT * FROM testaa
I get '8.00' from the 'a' field.
It looks like you're using an abstraction library? Perhaps that's the problem?
-Micah
On 12/15/2007 07:13 PM, Ron Piggott wrote:
INSERT INTO rate_plans VALUES ( '12', 'One Week', '1', '2', '2', '8.00' ) When I use $advertisement_rate = mysql_result($rate_plan_result,0,"rate"); $advertisement_rate has a value of 800 instead of 8.00 --- how can I get my 2 decimal places back? Ron On Sat, 2007-12-15 at 18:18 -0800, Micah Stevens wrote:What's your insert statement? On 12/15/2007 05:11 PM, Ron Piggott wrote:that is set up as: rate decimal(4,2) Example: Right now it is giving me 800 instead of 8.00 RonHow do I get the decimal point back when I am retrieving from a column