Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
49
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. t.*
  3. FROM
  4. tweets AS t
  5. JOIN (
  6. SELECT
  7. tweet_id
  8. FROM
  9. tweets
  10. WHERE
  11. id = 11618
  12. ) AS o ON t.tweet_id = o.tweet_id
  13. AND t.id < if((SELECT MAX(ID) FROM tweets limit 1) = 11618, 11618 + 1, 11618)
  14. OR t.tweet_id < o.tweet_id
  15. ORDER BY
  16. t.tweet_id DESC,
  17. t.id DESC
  18. LIMIT
  19. 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement