Nuno Pereira wrote:
To do date change the first line from
printf(" number_format({$thearray[cost]}, 2)
to
printf(" ".number_format({$thearray[cost]}, 2)."
I think you mean:
print( "" . number_format( $thearray['cost'], 2 ) . "" );
As stated by a previous poster to this thread, you should
Bill Whitacre wrote:
I can get this to work just fine:
Comes out $23,999.39
I'd like use the number_format() thingie on an array returned from a
mysql_query.
My current program snippet looks like:
$res = mysql_query("SELECT org, COUNT(*), SUM(annual_cost) AS
cost FROM a05
Bill Whitacre wrote:
printf(" {$thearray[org]}
{$thearray["COUNT(*)"]}
$ {$thearray[cost]} ");
If I replace
{$thearray[cost]}
with
number_format({$thearray[cost]}, 2)
Although this is a MySQL mailing list and your problem is not MySQL
related, but a PHP question I'
I can get this to work just fine:
Comes out $23,999.39
I'd like use the number_format() thingie on an array returned from a
mysql_query.
My current program snippet looks like:
$res = mysql_query("SELECT org, COUNT(*), SUM(annual_cost) AS
cost FROM a05
GROUP BY org ORDER BY
-3
- Original Message -
From: "Ryan McDougall" <[EMAIL PROTECTED]>
To: "mysql" <[EMAIL PROTECTED]>
Sent: Sunday, January 19, 2003 6:47 PM
Subject: A mysql php question
> Hello everyone,
>
> I'm not sure if this is the proper place to be asking
Hello everyone,
I'm not sure if this is the proper place to be asking this question as I
believe it is more of a question on how to traverse through php arrays and such
but it is using a mysql_query function. So if this not the place pleace don't
read any further and ignore and/or delete this mess
1:16 PM
Subject: mysql php question
Does anyone have some simple sample code using php to access a mySQL
database?
Could you post it or send someit to me please?
Taylor Lewick
Unix System Administrator
Fortis Benefits
816 881 6073
"Help Wanted. Seeking Telepath..
The one at www.php.net
-Original Message-
From: Taylor Lewick [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 1:50 PM
To: [EMAIL PROTECTED]
Subject: Re: mysql php question
gotcha, thanks, which manual is that?
Taylor Lewick
Unix System Administrator
Fortis Benefits
816 881
gotcha, thanks, which manual is that?
Taylor Lewick
Unix System Administrator
Fortis Benefits
816 881 6073
"Help Wanted. Seeking Telepath..."
"You Know where to apply."
>>> [EMAIL PROTECTED] 06/24/02 01:39PM >>>
in the php manual in the section of functions about mysql, it has a few
examples.
Sent: Monday, June 24, 2002 2:16 PM
Subject: mysql php question
Does anyone have some simple sample code using php to access a mySQL
database?
Could you post it or send someit to me please?
Taylor Lewick
Unix System Administrator
Fortis Benefits
816 881 6073
"Help Wanted. Seeking Telepath..
Does anyone have some simple sample code using php to access a mySQL database?
Could you post it or send someit to me please?
Taylor Lewick
Unix System Administrator
Fortis Benefits
816 881 6073
"Help Wanted. Seeking Telepath..."
"You Know where to apply."
11 matches
Mail list logo