Advertisement
Guest User

Untitled

a guest
Nov 1st, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. SELECT
  2. posts.ID as ID,
  3. CONCAT(users.FirstName, ' ', users.LastName) as Name,
  4. posts.Date as Date,
  5. posts.Text as Text
  6. FROM users, posts, friends
  7. WHERE users.ID = posts.UserID AND
  8. ((posts.UserID = friends.ID1 AND friends.ID2 = '10000007') OR
  9. (posts.UserID = friends.ID2 AND friends.ID1 = '10000007')
  10. OR (posts.UserID = '10000007'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement