Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT friends.user_id, friends.friend_id, username
- FROM
- FRIEND_LIST friends, USER
- WHERE
- CAT_USER.id = friends.friend_id
- AND
- friends.user_id = 1
- UNION
- SELECT
- fof.user_id, fof.friend_id, username
- FROM
- FRIEND_LIST friends, FRIEND_LIST fof, USER
- WHERE
- USER.id = fof.friend_id
- AND
- friends.friend_id = fof.user_id
- AND
- friends.user_id = 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement