LEFT JOIN should do the trick for you...
SELECT players.PLAYERID, players.FIRSTNAME, players.LASTNAME,
COUNT(goals.SCORER)
FROM players
LEFT JOIN goals ON goals.SCORER = players.PLAYERID
WHEREplayers.TEAMID = '$TEAMID'
GROUP BY PLAYERID ORDER BY player.LASTNAME;
Cheers,
Kent
$newgoalquery = mysql_query("select players.PLAYERID, players.FIRSTNAME,
players.LASTNAME, COUNT(goals.SCORER) as TG FROM players, goals where
(goals.SCORER = players.PLAYERID) AND players.TEAMID = '$TEAMID' GROUP BY
PLAYERID ORDER BY players.LASTNAME");
I'm trying to fetch out the number of goal