Thanks, but how can I pass the current users value from the other query ?

On Thu, Feb 3, 2011 at 4:22 PM, Simcha Younger <sim...@syounger.com> wrote:

> On Thu, 3 Feb 2011 13:55:36 +0000
> Tompkins Neil <neil.tompk...@googlemail.com> wrote:
>
> > SELECT DISTINCT(away_teams_id) AS teams_id
> > FROM fixtures_results
> > WHERE (fixtures_results.away_users_id = *users.users_id*)
>
> > Any ideas why I'm getting Unknown column 'users.users_id' in 'where
> clause'
> > for the part of the statement that I've marked as *bold* and how I can
> over
> > come this problem ?
>
> You have to add the users table to the subquery.
> Your subquery only has the fixtures_results table in the 'from' clause, and
> the subquery is not aware of the tables you use in the outer query.
>
> --
> Simcha Younger <sim...@syounger.com>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=neil.tompk...@googlemail.com
>
>

Reply via email to