I have 3 tables structured like so:
activity table:
activity_id, user_id, type, date
reviews table:
review_id, activity_id, fishery_id, review, date
updates table:
update_id, activity_id, update, date
I want to call the all the reviews and updates which are linked to a user by the activity table however this query returns incorrect results, any ideas?
query('
  SELECT *
  FROM activity as activity    
  LEFT JOIN reviews AS reviews
    ON activity.activity_id = reviews.activity_id    
  LEFT JOIN updates AS updates
    ON activity.activity_id = updates.activity_id    
  WHERE user_id = 1
');
Thanks, Matt