Re: Error Unknown column in 'where clause'

2010-11-17 Thread Paul DuBois
Some discussion of causes for this is at: http://dev.mysql.com/doc/refman/5.0/en/join.html Look for the part beginning: "Join Processing Changes in MySQL 5.0.12" On Nov 16, 2010, at 10:09 AM, Tompkins Neil wrote: > Hi > > I've the following query : > > SELECT players_bids.players_bids_id, pla

Re: Error Unknown column in 'where clause'

2010-11-16 Thread Michael Dykman
I have run into similar issues in far less convoluted circumstances. I'm not going to try to decode your query but using an alias can help clarify things. ... team_name_to FROM players_bids AS PB INNER JOIN players ON players_bids.players_id = players.players_id ... and rename all your player_bid

Error Unknown column in 'where clause'

2010-11-16 Thread Tompkins Neil
Hi I've the following query : SELECT players_bids.players_bids_id, players_bids.players_id, players_bids.bid_date, players_bids.bid_type, players_bids.bid_value, (SELECT SUM(IF(home_users_id = players_bids.users_id_from,home_manager_points,away_manager_points)) FROM fixtures_results WHERE (home_u