Dear all,
I've got a query that does a LEFT JOIN.
Something like this:
[tt]
SELECT a.id, myB.someField, c.someColumn
FROM c, a
LEFT JOIN b AS myB ON (myB.id = a.id)
[/tt]
which works.
However, if I reverse the two tables in the FROM clause, it doesn't work anymore. It seems like the table in the ON part has to be the last table mentioned in the FROM clause.
Curiously enough, it DOES work on MySQL 4 (4.1.16-nt), but NOT on MySQL 5 (5.0.45-community-nt).
This might not seem much of a problem, but sometimes I want to do more LEFT JOINs in one query, with different tables in the ON part. And I don't see how I can do that in MySQL 5.x, as all the tables would all have to be last in line in the FROM part.
It did work perfectly fine in MySQL 4.x though... ;-(
Am I missing something here..?!?!
Is there a way of solving this?!?
I've got a query that does a LEFT JOIN.
Something like this:
[tt]
SELECT a.id, myB.someField, c.someColumn
FROM c, a
LEFT JOIN b AS myB ON (myB.id = a.id)
[/tt]
which works.
However, if I reverse the two tables in the FROM clause, it doesn't work anymore. It seems like the table in the ON part has to be the last table mentioned in the FROM clause.
Curiously enough, it DOES work on MySQL 4 (4.1.16-nt), but NOT on MySQL 5 (5.0.45-community-nt).
This might not seem much of a problem, but sometimes I want to do more LEFT JOINs in one query, with different tables in the ON part. And I don't see how I can do that in MySQL 5.x, as all the tables would all have to be last in line in the FROM part.
It did work perfectly fine in MySQL 4.x though... ;-(
Am I missing something here..?!?!
Is there a way of solving this?!?