No time to figure out what you are doing, but I think you will find your answer here - if not send the table structure for the table you store the team id of the home and visitor in: http://www.wdvl.com/Authoring/DB/SQL/Joins/
olinux --- "Michael J. Mitchell" <[EMAIL PROTECTED]> wrote: > > I am trying to make a query that usses the same > table twice. I have a table > of scores and a table of teams and the scores table > has both the visitors > and home team in it as an ID that is in the teams > table. I can't get my > MySQL statement to work, it does not like the > parentheses. > > SELECT PH_SCORE_HEADER.StatID, PH_TEAMS.TeamName AS > Home, > PH_TEAMS_1.TeamName AS Visitor, > PH_SCORE_HEADER.GameDate > > FROM PH_TEAMS AS PH_TEAMS_1 INNER JOIN (PH_TEAMS > INNER JOIN PH_SCORE_HEADER > ON PH_TEAMS.TeamID = PH_SCORE_HEADER.Home) ON > PH_TEAMS_1.TeamID = > PH_SCORE_HEADER.Visitor; > > I think the problem is with the Parenthesies, but I > don't know how to > re-write the SQL. > > Any suggestions? > > > _________________________________________________________________ > Join the world’s largest e-mail service with MSN > Hotmail. > http://www.hotmail.com > > > --------------------------------------------------------------------- > 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 > __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com --------------------------------------------------------------------- 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