can i make a comment?
suppose you do what the title of this thread suggests...
FROM orderline ol
JOIN `ORDER` o
ON o.id = ol.order_id
WHERE o.id = 1
the problem with this construction in general is that the WHERE condition destroys the "left-outer-joinedness" of the join
any row of the left table which had no matching row in the right table will be thrown away, because the NULL that is entered into all the columns of the right table will never meet the WHERE condition
hence it operates as an inner join
that's the problem with using a WHERE clause on any columns of the right table in a left outer join
having said all that, lets take a closer look at these particular tables
under what circumstances would you expect to find a row in the orderlines table that had no matching row in the order table?
never, right? (unless the app itself is broken)
so it should actually be written as an INNER JOIN from the get-go