that makes sooo much sense..
but I keep getting an error.
here is my sql:
$sql=mysql_query("SELECT (SELECT team_name FROM tbl_teams WHERE team_id='g.team_home') AS home_team, (SELECT team_name FROM tbl_teams WHERE team_id='g.team_away') AS away_team FROM tbl_photo_games AS g");
i have tried the above code without the single quotes around the team_id='g.team_home' as well.
and the error:
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource
does it need to be handled differently as its in php?