Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 30th, 2012  |  syntax: None  |  size: 0.35 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. MySQL returns some rows 3 times AGAIN
  2. GROUP BY
  3.        
  4. SELECT w.windate,
  5. w.wintime,
  6. w.field,
  7. w.htname,
  8. w.vtname,
  9. w.plateumpire,
  10. p.pteamname,
  11. pc.coach_name
  12. FROM player_coaches AS pc
  13. INNER JOIN playerteams AS p
  14. ON p.coachId = pc.coachId
  15. INNER JOIN sportsdb_wins AS w
  16. ON p.pteamname IN (w.htname, w.vtname)
  17. WHERE p.coachId = '$coachId'
  18. AND p.forteam = '$teamId'