football/soccer match report problem php/mysql
hi,
the image above shows football match report card, needs played (which done)
but need know player scored how many goals, team.
i tried creating loop within loop dreamweaver not allow that, there anyway can it?
also iit list player got red card/yellow card , man of match each team
the sql statements page:
$matchid = mysql_real_escape_string($_request['id']); mysql_select_db($database_db, $db); $query_history = "select *, date_format(matches.date, '%w %d %m %y') mdate matches left join matchscores on matches.match_id = matchscores.match_id left join team on team.team_id = matchscores.team left join referee on referee.ref_id = matches.referee_id left join venue on venue.venue_id = matches.venue_id matches.match_id = $matchid"; $history = mysql_query($query_history, $db) or die(mysql_error()); $row_history = mysql_fetch_assoc($history); $totalrows_history = mysql_num_rows($history); mysql_select_db($database_db, $db); $query_enable_login = "select disable_login season"; $enable_login = mysql_query($query_enable_login, $db) or die(mysql_error()); $row_enable_login = mysql_fetch_assoc($enable_login); $totalrows_enable_login = mysql_num_rows($enable_login); mysql_select_db($database_db, $db); $query_match_fixtures = "select m.match_id, date_format(m.date, '%d/%m/%y') mdate, m.time, t1.division, m.report, t1.team_name team1_name, s1.score score1, t2.team_name team2_name, s2.score score2 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) s1.team <> s2.team , m.match_id = $matchid group match_id order 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); mysql_select_db($database_db, $db); $query_match_player = "select * match_player left join player on player.player_id = match_player.player_id left join team on player.team_id = team.team_id match_id = $matchid , team.team_name = '$row_match_fixtures[team1_name]'"; $match_player = mysql_query($query_match_player, $db) or die(mysql_error()); $row_match_player = mysql_fetch_assoc($match_player); $totalrows_match_player = mysql_num_rows($match_player);
More discussions in Develop server-side applications in Dreamweaver
adobe
Comments
Post a Comment