[eluser]Glazz[/eluser]
Using less queries, this is the only way i know.
But you can however, query the teams table first, and then when you loop through the matches you get the team name using the team id.
For example, you get the teams using something like:
Code:
$teams = $this->db->get('teams')->result_array();
And then you get all the matches:
Code:
$matches = $this->db->get('matches')->result();
Now where you want to show the matches data you create the "loop":
Code:
foreach ( $matches as $match ):
// lets show the name of the home team.
echo $teams[ $match->match_team_home ]['team_name'];
// show the name of the away team.
echo $teams[ $match->match_team_away ]['team_name'];
endforeach;
Something like this, don't know if it works because i didn't tested it, but this is the idea.