I have the following query that works fine in MySqlWorkbench but not in php. I've copied the query exactly from php into workbench and it works fine there. Any ideas why this is happening? I can't figure it out.
SELECT tlpd_games.id FROM tlpd_games
LEFT JOIN tlpd_leagues league on tlpd_games.league_id = league.id
where league.section_id = 1
order by date desc LIMIT 0, 20
Unknown column 'league.section_id' in 'where clause'