PHP Newbie- Display Aggregates in HTML Table

Поиск
Список
Период
Сортировка
От Reed Loefgren
Тема PHP Newbie- Display Aggregates in HTML Table
Дата
Msg-id 20060426073420.Q3269@auden.jmla.com
обсуждение исходный текст
Ответы Re: PHP Newbie- Display Aggregates in HTML Table
Список pgsql-php
All,

I have a query that returns data that includes a sum(). I can't get this
sum to display in an html table. Like so (in part):

Example bit:

psql test: select code, blah, sum(time) from test;

Portion of PHP table code:

while($myrow = pg_fetch_assoc($result)) {
     printf ("<tr><td>%s</td><td>%s</td><td>%s</td></tr>",
       $myrow['code'], $myrow['blah'], $myrow['<what goes here?>']);


I'm sure there's errors here, and bad coding too, but it works just fine
if I don't have sum() or count(*) in the query. And the query works fine
with sums and counts as long as I don't try and execute it in PHP. So my
coding is wrong/uneducated. What's amiss here?

Thanks,

r

В списке pgsql-php по дате отправления: