yes i edited my OP
I have been fiddling around with your code ken, thanks for it, it was really helpful.
I have nearly the result i need using
SELECT s.id, s.team1, s.team2, s.team1_score, s.team2_score
FROM schedule s
INNER JOIN teams t ON t.id = s.team1
INNER JOIN teams k ON k.id = s.team2
ORDER BY t.name, k.name
The only thing i need now is a way to get t.name and k.name.
I uses the following php code:
while ($count < $total_rows) {
$team1 = mysql_result($resultset,$count,"team1");
$team2 = mysql_result($resultset,$count,"team2");
$t1_score = mysql_result($resultset,$count,"team1_score");
$t2_score = mysql_result($resultset,$count,"team2_score");
I tried different things to get the t.name and k.name in my result set but without luck.
Any ideas on this?