$pl_goal_rs = $conn->Execute ( "SELECT COUNT(goal.player_id) as pl_goal, player_fname, player_lname, match_type FROM player, goal, matches WHERE goal.player_id=player.player_id AND player.player_id=" . $_GET['player_id'] . " AND matches.match_type=1 GROUP BY matches.match_type" ) or die ( $conn->ErrorMsg() );
$cl_goal_rs = $conn->Execute ( "SELECT COUNT(goal.player_id) as cl_goal, player_fname, player_lname, match_type FROM player, goal, matches WHERE goal.player_id=player.player_id AND player.player_id=" . $_GET['player_id'] . " AND matches.match_type=2 GROUP BY matches.match_type" ) or die ( $conn->ErrorMsg() );
$fac_goal_rs = $conn->Execute ( "SELECT COUNT(goal.player_id) as fac_goal, player_fname, player_lname, match_type FROM player, goal, matches WHERE goal.player_id=player.player_id AND player.player_id=" . $_GET['player_id'] . " AND matches.match_type=3 GROUP BY matches.match_type" ) or die ( $conn->ErrorMsg() );
I'm trying to get each query to return something different, based on matches.match_type.
In the HTML I have 3 different places for each, but they are all showing the same thing. The total number of goals, regardless of the match_type.
match_type is an INT.
Going to step away from the computer for like 20 minutes, this is really upsetting me. I've tried probably 50 things and none have worked!
THANKS!