I have three database tables: users, user_profiles and friends:
users
- id
- username
- password
user_profiles
- id
- user_id
- full_name
friends
- id
- usera_id
- userb_id
What would be a query which finds the friends list of any user and also joins the table users and user_profiles to get the profile and user information of that friend?
Use:
…assuming
userb_idis the friend id.