MySQL Forums
Forum List  »  PHP

Getting odd problem with SQL statement
Posted by: kleric42
Date: March 17, 2006 11:02PM

select tp.TEAM_ID, tp.POS, p.PLAYER_ID, FNAME, LNAME, ps.W, ps.L, ps.ERA
from bosi_TEAM_PITCHER tp, bosi_PLAYER p
LEFT JOIN bosi_PITCH_STATS ps ON (ps.PLAYER_ID = tp.PLAYER_ID and ps.STAT_TYPE = 'O' and ps.SEASON = 1907)
where tp.PLAYER_ID = p.PLAYER_ID and tp.LEAGUE_ID = 1 and tp.ROSTER='ML' and tp.ROLE = 'SP'

the error phpmyadmin/mysql gives me is:

#1054 - Unknown column 'tp.PLAYER_ID' in 'on clause'

and my php script gives me pretty much the same thing:
Unknown column 'tp.PLAYER_ID' in 'on clause'

is there some syntax with LEFT JOINs I'm doing wrong?

Options: ReplyQuote


Subject
Written By
Posted
Getting odd problem with SQL statement
March 17, 2006 11:02PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.