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 f2.fromid = f1.uid AND f1.fromid = f2.uid
- inner join profiles as u on f2.fromid = u.uid
- where
- WHERE f1.uid != 10 and f2.uid != 10
- GROUP BY u.uid
Add Comment
Please, Sign In to add comment