From: Michael Dykman Date: November 16 2010 5:56pm Subject: Re: Error Unknown column in 'where clause' List-Archive: http://lists.mysql.com/mysql/223588 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 =3D players.players_id ... and rename all your player_bids to reference to the alias. It usually resolves the problem for me. =A0- michael dykman > On Tue, Nov 16, 2010 at 11:09 AM, Tompkins Neil > wrote: >> Hi >> >> I've the following query : >> >> >> but the problem I have is that when referencing players_bids.users_id_fr= om >> within the UNION I get back the following error : >> >> Error Code: 1054 >> Unknown column 'players_bids.users_id_from' in 'where clause' >> >> Any ideas how to overcome this problem ? >> >> Cheers >> Neil >> > > > > -- > =A0- michael dykman > =A0- mdykman@stripped > > =A0May the Source be with you. > --=20 =A0- michael dykman =A0- mdykman@stripped =A0May the Source be with you.