GROUP_CONCAT is it the answer?

OK I Have a table in a MySQL database which stores results from rugby matches.
I have the following  query:
SELECT LeagueTeam_0.TeamName AS TeamName_1, LeagueTeam.TeamName, LeagueResult.LeagueID, LeagueResult.SeasonID, LeagueResult.hscore, LeagueResult.ascore, LeagueResult.LRDate
FROM ((LeagueResult LEFT JOIN LeagueTeam ON LeagueTeam.LeagueTeamsID=LeagueResult.hteam) LEFT JOIN LeagueTeam AS LeagueTeam_0 ON LeagueTeam_0.LeagueTeamsID=LeagueResult.ateam)
That gives this result:
I would only like th date to appear on a single record so I can lay out the results like so
05-09-2009
Ilkley               41      3     Harlepool
Morpeth          31    35     Gateshead
Percy Park     43     22     Driffield
etc.
12-09-2009
Ilkley            38     24    Old Brodleians
Hartlypool    17    22      Morpeth
etc.
I have heard that GROUP_CONCAT will do this but I'm not sure how or if it even works in Dreamweaver 8.
Any help would be appreciated

Thanks for you help on this David
I want to use a table for the final layout so I have set up the following simple test to get this working
I am using a Recordset called Recordset2 and have incorporated your code (in blue) into my repeat region but I get the following message
Parse error:  syntax error, unexpected $end in /home/driffiel/public_html/TESTER2.php on line 69
Here is the markup with repeat region:
<body>
<table width="240">
  <?php do { ?>
  <tr>
    <td colspan="4"><?php if (!isset($prevDate) || $row_Recordset2['LRDate'] != $prevDate) {
  echo $row_Recordset2['LRDate'];
?></td>
  </tr>
  <tr>
    <td><?php echo $row_Recordset2['TeamName']; ?></td>
    <td><?php echo $row_Recordset2['hscore']; ?></td>
    <td><?php echo $row_Recordset2['ascore']; ?></td>
    <td><?php echo $row_Recordset2['TeamName_1']; ?></td>
    <?php $prevDate = $row_Recordset2['LRDate']; ?>
    <?php } while ($row_Recordset2 = mysql_fetch_assoc($Recordset2)); ?>
  </tr>
</table>
</body>

Similar Messages

Maybe you are looking for