Re: Re: Alternating Table Rows, Part Deux..

From: Date: Fri, 10 May 2002 22:05:33 +0000
Subject: Re: Re: Alternating Table Rows, Part Deux..
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-97024@lists.php.net to get a copy of this message
Miguel Cruz wrote:
On Fri, 10 May 2002, Austin Marshall wrote:
This not only takes care of the table row colors, but also removes duplicate company names so it looks MUCH neater this way :))))
Is there not a GROUP BY clause in MS SQL? I'm pretty sure there is. If you group the query by company name then you don't have to worry about duplicate company names... and it will help with performance, since the db is optimized for that and you don't have to waste PHP to determine if the row is a duplicate.
But he's dealing with cases where the company name remains the same but other data in the row changes (for instance, a company with multiple offices, where you wanted to list the phone number and address for each). GROUP BY would discard that other data. miguel
Yeah, apparently i wasn't the first to not catch that either. I realy should start paying attention.

« previous php.general (#97024) next »