Here is my database structure. User table -user_id -fname -lname
profile table -profile_user_id -profile_id -profile_id
friend_request table -id -from_id -to_id -status my query is SELECT fname,lname,profile FROM user LEFT JOIN profile ON user.user_id = profile.profile_id WHERE(SELECT status FROM friend_request WHERE status = 'friend')