I have this
What almost works except i need to add WHERE t1.user_id = '".$_SESSION['userID']." AND t2.accepted = '1' to it but i cant get the right place for the WHERE. Where abouts would i put it?
"SELECT t1.username, t1.user_id, t2.userID, t2.friendID, t2.accepted FROM members AS t1 JOIN friendships AS t2 ON t1.user_id = t2.friendID";
Also, if i wanted to select all fields from both tables would i just put
"SELECT * FROM members AS t1 JOIN friendships AS t2 ON t1.user_id = t2.friendID";