I need a bit of help with a mysql join query. I have tried and tried and keep getting unhelpful errors.
I have two mysql tables:
friends:
friend1 INT
friend2 INT
members:
member_id INT
name varchar
lname varchar
Basically I want to loop through friends and find all records where friend1 is my member_id and then get the details for friend2 from the members file. I need a query that will return the data in members IF members.member_id = friends.friend2 AND where friends.friend1 = 1.
Can any one help me here? I think if I could get the basic down I can expand from there, but dang if I am getting nowhere on this join <g>