Re: php/mysql grouping output
| From: | Jack | Date: | Sun, 09 Mar 2003 20:02:55 +0000 |
| Subject: | Re: php/mysql grouping output | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138877@lists.php.net to get a copy of this message | ||
On Sun, 9 Mar 2003 14:56:31 -0500
Kelly Meeks <meeks@rightangleinc.com> wrote:
> Order Num Order Date Product Code Product Name
> ---------------------------------------------------------------------------------------
> 1 2003-01-01 12345 product xyz
> 2 2003-01-01 12345 product xyz
> 3 2003-01-01 abcde product abc
> 1 2003-01-01 abcde product abc
> 5 2003-01-01 12345 product xyz
>
> If I wanted to have the output grouped on any of the fields, how would I go about doing it?
>
append to your query:
... GROUP BY tablename.column_name