Is it allowed to reference external field from nested select?
E.g.
SELECT
FROM ext1
LEFT JOIN (SELECT * FROM int2 WHERE int2.id = ext1.some_id ) as x ON 1=1
in this case, this is referencing ext1.some_id in nested select. I am getting errors in this case that field ext1.some_id is unknow. Is it possible? Is there some other way?
UPDATE:
Unfortunately, I have to use nested select, since I am going to add more conditions to it, such as LIMIT 0,1 and then I need to use a second join on the same table with LIMIT 1,1 (to join another row) The ultimate goal is to join 2 rows from the same table as if these were two tables So I am kind of going to "spread" a few related rows into one long row.