This select statement displays all the members that have view another members profile. The only problem is if the member that has viewed the other member has more than one photo on his/her profile all the pictures are showing. I’m only trying to show one picture for each member. Can you please help? I don’t know where to put the DISTINCT part
SELECT rate_profile_views., rate_members., rate_pictures.* FROM rate_profile_views LEFT JOIN rate_members ON v_by=m_id LEFT JOIN rate_pictures ON i_user=m_id WHERE v_for=m_id AND i_status>0 AND m_confirmed !=0 AND m_type !=<%m_type%> ORDER BY v_time DESC LIMIT 52