Thanks for the replies, okay...
What I have is a table of scenes which links actors to scenes and lists what happens to that person in the scene. By using group concat and group by in the scene I am able to get all actors in the database that are part of a certain scene so if there is one actor it only lists them, if there are three it lists them all.
What I wanted was for it to have the individual scene details for the person who is being viewed. To use an example...
The film is The Godfather, the scene has both Al Pacino and James Caan in it. Within the scene Al Pacino shoots somebody, within the same scene James Caan kicks somebody.
With two rows showing each actor within the scene if the person clicks on to Al Pacino's bio page and scene breakdown they would see...
Scene: X
Starring: Al Pacino, James Caan
Action: Shoots Person
And in James Caan it would be...
Scene: X
Starring: James Caan, Al Pacino
Action: Kicks Person
The best way I found of grouping the people together without going through every single row in the table was to group concat and group by but this only gives out the 'top' row in the group and for group concat will always list the first row first.
I'm still in the learning phase in regards to the many features of MySQL so maybe there is a better way. Hopefully this has made it a little clearer about what I'm trying to achieve, if not let me know.
The Query is...
SELECT movie.name as moviename, scenes.details, CONCAT(',', SUBSTRING(GROUP_CONCAT(scenes.personid),1,7),',') as pids, GROUP_CONCAT(people.name SEPARATOR ', ') as starring FROM movies LEFT JOIN scenes ON movies.id = scenes.movieid LEFT JOIN people ON scenes.personid = people.id WHERE scenes.movieid = '$GET[movieid]' GROUP BY scenes.sceneid HAVING pids LIKE '%,$GET[pid],%'