Last active
November 28, 2022 14:40
-
-
Save sergeykuzmich/7f075577b3bb06524f7bdcc5409771b0 to your computer and use it in GitHub Desktop.
Cursored Query Previous Page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT uid, title, content, datetime | |
FROM news | |
WHERE (datetime, uid) > ((SELECT datetime FROM news WHERE uid = :uid), :uid) | |
ORDER BY (datetime, uid) ASC | |
LIMIT :per_page; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment