MySQL Query Multiple Joins with Incorrect Results

rockyard

New Member
I have 3 tables structured like so:activity table:\[quote\] activity_id, user_id, type, date\[/quote\]reviews table:\[quote\] review_id, activity_id, fishery_id, review, date\[/quote\]updates table:\[quote\] update_id, activity_id, update, date\[/quote\]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?\[code\]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');\[/code\]Thanks, Matt
 
Back
Top