Re: [PHP-DB] Converting to Decimal

2006-06-28 Thread Skip Evans
de Junio de 2006 06:04 p.m. To: [EMAIL PROTECTED] Cc: Php-Db Subject: Re: [PHP-DB] Converting to Decimal Mark Bomgardner wrote: I am query a database and pulling some decimal values out of the table, but when I display whole numbers in php, it drops the decimal places. It takes a value of 12.00

RE: [PHP-DB] Converting to Decimal

2006-06-28 Thread Miguel Guirao
You could actually do (int) $var or use the sprintf(%d, $var); -Original Message- From: John Meyer [mailto:[EMAIL PROTECTED] Sent: MiƩrcoles, 28 de Junio de 2006 06:04 p.m. To: [EMAIL PROTECTED] Cc: Php-Db Subject: Re: [PHP-DB] Converting to Decimal Mark Bomgardner wrote: > I am qu

RE: [PHP-DB] Converting to Decimal

2006-06-28 Thread Bastien Koert
$val = number_format($row['val'],2); Bastien From: Mark Bomgardner <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Php-Db Subject: [PHP-DB] Converting to Decimal Date: Wed, 28 Jun 2006 17:20:21 -0500 I am query a database and pulling some decimal values out of the ta

Re: [PHP-DB] Converting to Decimal

2006-06-28 Thread John Meyer
Mark Bomgardner wrote: I am query a database and pulling some decimal values out of the table, but when I display whole numbers in php, it drops the decimal places. It takes a value of 12.00 in the database and makes it 12, where I need 12.00. I am having trouble finding ways to "cast" this val

[PHP-DB] Converting to Decimal

2006-06-28 Thread Mark Bomgardner
I am query a database and pulling some decimal values out of the table, but when I display whole numbers in php, it drops the decimal places. It takes a value of 12.00 in the database and makes it 12, where I need 12.00. I am having trouble finding ways to "cast" this value. markb -- PHP D