I have a feeling I am completely borking this MySQL query but I'll ask anyway. I am wondering why I get the warning Unknown column 'FOO', and how I can get this query to work properly, in 'where clause'
when I run the following:
SELECT
sample_id as FOO
FROM
tbl_test
WHERE
sample_id = 521 AND sample_id IN (
Select
sample_id
FROM
tbl_test
WHERE
sample_id = FOO
GROUP BY sample_id
)
Edit This query works fine on a different server and fails as described above on the new server. The old one was v 5.0.45 and the new one is 5.0.75.