Re: [PHP-DB] decimal point

2007-12-16 Thread Stephen Johnson
You will lose your decimal places during normal calculations... But you can display them back to the user using number_format. http://php.net/number_format Bear in mind that you should always pass the formatted number into a different variable as you will NOT be able to perform any further calcu

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] sql problem

2007-12-16 Thread Bastien Koert
http://www.php.net/manual/en/function.number-format.php bastien > Date: Sun, 16 Dec 2007 17:17:41 +0600 > From: [EMAIL PROTECTED] > To: php-db@lists.php.net > Subject: [PHP-DB] sql problem > > my problem in the following code > > INSERT INTO `test` (

[PHP-DB] sql problem

2007-12-16 Thread arafat uddin
my problem in the following code INSERT INTO `test` ( `debit` ) VALUES ( '2' ) when i search it shows like this: SELECT debit FROM `test` output is :2. but i have to show output :20,000.00 like input 2 output 20,000.00 input 3000 output 3,000.00 input 10 output 1,0.00