I have this join:
select first_name, last_name, photo_path, private_messages, mid_thumb,
bio_blurb, user_email
from users
left join member_photo on users.user_id = member_photo.photo_member_id
left join user_email_options on users.user_id = user_email_options.email_user_id
where user_id = 2
For some reason, it gives two rows instead of 1 row that I expected with the users information. Is there anything obvious that I am missing? I have done a bunch of left joins before and never seem to have encountered this. Why would I get 2 items in the result set?
Here is what happens on the page for example:
http://www.comehike.com/community/hiker_public_profile.php?community_member_id=2
See – two records.
Sounds like
member_photooruser_email_optionshas more than one row corresponding to user_id 2