Re: [PHP-DB] decimal point

2007-12-19 Thread Micah Stevens
IL PROTECTED]> Date: Sun, 16 Dec 2007 12:55:01 -0500 To: Micah Stevens <[EMAIL PROTECTED]> Cc: Subject: Re: [PHP-DB] decimal point Ok. I have this resolved. One more question about this --- is there any way I may keep the 2 decimal places when I use math to manipulate the va

Re: [PHP-DB] decimal point

2007-12-16 Thread Stephen Johnson
zation: Acts Ministries Christian Evangelism > Reply-To: <[EMAIL PROTECTED]> > Date: Sun, 16 Dec 2007 12:55:01 -0500 > To: Micah Stevens <[EMAIL PROTECTED]> > Cc: > Subject: Re: [PHP-DB] decimal point > > Ok. I have this resolved. > > One more question about t

Re: [PHP-DB] decimal point

2007-12-16 Thread Ron Piggott
Ok. I have this resolved. One more question about this --- is there any way I may keep the 2 decimal places when I use math to manipulate the variable --- $rate_plan_rate = ($rate_plan_rate / 100) * (100 - $discount); $ 28.8 I would like the result to be $28.80 Thanks for your help Micah. R

Re: [PHP-DB] decimal point

2007-12-15 Thread Micah Stevens
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,

Re: [PHP-DB] decimal point

2007-12-15 Thread Ron Piggott
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

Re: [PHP-DB] decimal point

2007-12-15 Thread Micah Stevens
What's your insert statement? On 12/15/2007 05:11 PM, Ron Piggott wrote: How do I get the decimal point back when I am retrieving from a column that is set up as: rate decimal(4,2) Example: Right now it is giving me 800 instead of 8.00 Ron -- PHP Database Mailing List (http://www.php.ne

[PHP-DB] decimal point

2007-12-15 Thread Ron Piggott
How do I get the decimal point back when I am retrieving from a column that is set up as: rate decimal(4,2) Example: Right now it is giving me 800 instead of 8.00 Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php