Skip to content

Instantly share code, notes, and snippets.

@mrsoftware
Created February 2, 2020 20:12
Show Gist options
  • Save mrsoftware/fad2adb84c3c9e51b4a2527b0bdf7fbc to your computer and use it in GitHub Desktop.
Save mrsoftware/fad2adb84c3c9e51b4a2527b0bdf7fbc to your computer and use it in GitHub Desktop.
`SELECT
*
FROM
Posts
WHERE
CreateAt `+direction+` (SELECT CreateAt FROM Posts WHERE Id = :PostId)
AND ChannelId = :ChannelId
AND DeleteAt = 0
ORDER BY CreateAt `+sort+`
LIMIT :Limit
OFFSET :Offset`,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment