SELECT
tb1.booking_ref, tb1.investor, tb2.cost, tb3.product
FROM
tb1, tb3 LEFT JOIN tb2
ON
tb1.booking_ref = tb2.booking_ref
AND
tb1.investor = tb2.investor
AND
tb1.investor = '12345'
WHERE
tb1.location = tb3.location
The above query errors because of the references to tb3 - it works great without them.
Does anyone have any idea why??