On Fri, 9 May 2003, Molly Gibson wrote:
> Hi list,
> Textile geek-grrl here--I recently created a postgres
> database to keep my fabric, pattern, & project
> inventory. (Do I win a prize for 'weirdest thing for
> which someone has used postgres'?)
I'm certain there's someone out there doing something stranger than this.
> This is great for my purposes, but I'd like to clean
> up the table a bit more and have the category only
> print once each time it occurs, and the manufacturer
> only print once in each category.
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.