Guest User

Untitled

a guest
Oct 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. select
  2. u.uid, u.fname, u.lname, u.defaultpic, u.default_location
  3. from friends as f1
  4. 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
  5. inner join profiles as u on f2.fromid = u.uid
  6. where
  7. (f1.fromid = '10' OR
  8. f1.uid = '10') AND u.uid!='10'
  9.  
  10. GROUP BY u.uid
Add Comment
Please, Sign In to add comment