I’m working on the following SELECT statement:
SELECT *
FROM table1
LEFT JOIN table2 ON table2.contentid = table3.id AND table2.tmplid = table1.id
WHERE table2.value = "test"
I’m getting the following error:
Execution of a query to the database failed – Unknown column
‘table3.id’ in ‘on clause’ »
What am I doing wrong?
This is your problem:
You can’t have any table in your ON clause that’s not part of the join (in this case, table3).
Did you mean this instead: