Forum Moderators: open

Message Too Old, No Replies

MySQL: Not finding a column that exists

Could it be the LEFT OUTER JOIN?

         

ffoeg

7:27 am on Jun 2, 2008 (gmt 0)

10+ Year Member



Hey all.

I seem to have this error with one of my MySQL queries. It keeps warning me that one of the columns I am trying to select doesn't exist, yet I KNOW it exists.

The query that I am executing is shown below:


SELECT
eu.*,
p.province_name,
u.*
FROM
extended_users eu,
user u
LEFT OUTER JOIN
provinces p
ON
p.province_id = eu.province_id
WHERE
eu.id = u.pk_user

I have a feeling that it is the LEFT OUTER JOIN, as when I remove the join, and just select the details from the

user
and
extended_users
table, I can get the results easily.

If you need me to post up the creation SQL for the tables, let me know. Otherwise, I'd really appreciate the help.

Thanks
*G

ffoeg

8:34 am on Jun 2, 2008 (gmt 0)

10+ Year Member



Not to worry. I managed to sort this issue out using a nested query. :)