I have a table that holds teams, a table that holds scores and a table that holds match data.
I am finding it dificult to get the player data for the second team.
Currently It is showing player information for one team.
It does echo out the second team name, but not their player info.
Can someone have a look at my code and make it work.
I took off the code I had for the second team becuase it was ging me Error 1065
$query_match_fixtures = "select m.match_id, date_format(m.date, '%d/%m/%Y') as mDate, m.time, t1.division, m.report, t1.team_name as team1_name, s1.score as score1, t2.team_name as team2_name, s2.score as score2
from matches m left join (matchscores s1 left join team t1 on t1.team_id = s1.team) on (s1.match_id = m.match_id) left join (matchscores s2 left join team t2 on t2.team_id = s2.team) on (s2.match_id = m.match_id)
where s1.team <> s2.team AND m.match_id = $matchID
group by match_id
order by m.match_id";
$match_fixtures = mysql_query($query_match_fixtures, $db) or die(mysql_error());
//$row_match_fixtures = mysql_fetch_assoc($match_fixtures);
$totalRows_match_fixtures = mysql_num_rows($match_fixtures);
$match_player_query = "SELECT *
LEFT JOIN player on player.player_id = match_player.player_id
LEFT JOIN team ON player.team_id = team.team_id
WHERE match_id = ".$matchID."
AND team.team_name = '".$row_match_fixtures[$i]['team1_name']."'";
$result_match_player = mysql_query($match_player_query, $db) or die("large error ".mysql_errno());