DISTINCT() aswell as other fields

Hi there,
So far I have

SELECT DISTINCT(showName) AS showName FROM ".$this->TABLES['tvepisodes']." ORDER BY showName ASC 

which displays each show in a new table row.
I would like to be able to show the seasons beside each show aswell though.
Eg. atm
Show1
Show2

I would like it to show
Show 1 -Season1- Season2
Show 2 -Season1- Season2-Season3

Can I do this in the same SQL select or would I have to do another select where distinct(season) ??
Thanks for reading.
Greg

So for the time being unless someone knows another way

[size=8pt]SELECT DISTINCT(showName) AS showName FROM “.$this->TABLES[‘tvepisodes’].” ORDER BY showName ASC[/size]

and then within those DISTINCT results

[size=8pt]SELECT DISTINCT(season) AS season FROM “.$this->TABLES[‘tvepisodes’].” WHERE showName = ‘".$data[$i][‘showName’]."’ ORDER BY season ASC[/size]

Sponsor our Newsletter | Privacy Policy | Terms of Service