$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 goals for each player on the team ..
which it does, but if a player has 0 goals, it doesn't return that row,
which I need.  How can I write this query so it returns that information as
well?

If I need to post any other info to get an answer, such as my table
descriptions, please let me know.

Thanks!
Chad


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to