Re: formatting output: grouping results with identical fields

Поиск
Список
Период
Сортировка
От Molly Gibson
Тема Re: formatting output: grouping results with identical fields
Дата
Msg-id 20030512223134.16430.qmail@web41810.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: formatting output: grouping results with identical fields  ("scott.marlowe" <scott.marlowe@ihs.com>)
Список pgsql-php
--- "scott.marlowe" <scott.marlowe@ihs.com> wrote:
>
> What you can do is something like (this is pseudo
> code) before you start
> your while loop:
>
> $current_category = <category from first row>
>
> then in your while loop, check to see if it's
> changed:
>
> if ($current_category != $new_category){
>     print $new_category;
>     $current_category = $new_category;
> }
>
> Get the idea? It works a charm for things like this.

Gotcha...nice to know I was on the right track.
Thanks!

mol

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: formatting output: grouping results with identical fields
Следующее
От: Bruno Pacheco Mendonça
Дата:
Сообщение: