Re: [PHP-DB] currency out of postgresql

2001-09-14 Thread Justin Buist
While the proposed solution below may very well indeed work for this situation it's a far better practice to strip the variable down to "known to be good" values rather than "known to be bad" ones. Rather than strip $ and , marks from the variable it's far better to strip out anything other than

Re: [PHP-DB] currency out of postgresql

2001-09-14 Thread David Balatero
bsen [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 14, 2001 7:24 AM > To: Rick Eicher II > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] currency out of postgresql > > > > $formatted = sprintf("%01.2f", $money); > > printf ("%01.2f\n", $

[PHP-DB] currency out of postgresql

2001-09-14 Thread Rick Eicher II
AM To: Rick Eicher II Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] currency out of postgresql > $formatted = sprintf("%01.2f", $money); > printf ("%01.2f\n", $formatted); maybe twice, try: $formatted = sprintf("%01.2f", $money); echo "$formatted\n&quo

Re: [PHP-DB] currency out of postgresql

2001-09-14 Thread Bas Jobsen
: <[EMAIL PROTECTED]> Sent: Friday, September 14, 2001 6:48 PM Subject: [PHP-DB] currency out of postgresql > I am trying to get two currency values from out of the database, add them > together and print the to the screen. I am using the following code. > > $money = $myr

[PHP-DB] currency out of postgresql

2001-09-14 Thread Rick Eicher II
I am trying to get two currency values from out of the database, add them together and print the to the screen. I am using the following code. $money = $myrow[6] + $myrow[7]; $formatted = sprintf("%01.2f", $money); printf ("%01.2f\n", $formatted); $myrow[] is the array that I load the database r