pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Molly Gibson <molly_gibson2002@yahoo.com>
To: pgsql-php@postgresql.org
Subject: Re: formatting output: grouping results with identical fields
Date: Mon, 12 May 2003 15:31:34 -0700 (PDT)
Message-ID: <20030512223134.16430.qmail@web41810.mail.yahoo.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0305091601570.14159-100000@css120.ihs.com>

--- "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




view thread (4+ messages)

Message-ID: <20030512223134.16430.qmail@web41810.mail.yahoo.com>
Permalink:  ../20030512223134.16430.qmail@web41810.mail.yahoo.com/
Also on:    postgresql.org/message-id/20030512223134.16430.qmail@web41810.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: molly_gibson2002@yahoo.com
  Subject: Re: formatting output: grouping results with identical fields
  In-Reply-To: <20030512223134.16430.qmail@web41810.mail.yahoo.com>
  References: <Pine.LNX.4.33.0305091601570.14159-100000@css120.ihs.com> <20030512223134.16430.qmail@web41810.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox