Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- u.uid, u.fname, u.lname, u.defaultpic, u.default_location
- from friends as f1
- inner join friends as f2 on f1.uid=f2.uid OR f1.fromid=f2.fromid OR f1.uid=f2.fromid OR f1.fromid=f2.uid
- inner join profiles as u on f2.fromid = u.uid
- where
- (f1.fromid = '10' OR
- f1.uid = '10') AND u.uid!='10'
- GROUP BY u.uid
Add Comment
Please, Sign In to add comment