Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT u.ProfilePic AS FriendPic, u.UserName AS FriendName, m.*
- FROM (SELECT PhotographerId
- FROM Messages
- WHERE UserId=? OR PhotographerId=?
- GROUP BY PhotographerId
- ) AS m JOIN
- User AS u
- ON u.UserId = m.PhotographerId;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement