sql - postgresql offset specific column -


how select after articleid specific offset start

e.g start 28 28, 27, 26  offset = 28; limit = 3;  var query = 'select * "article" order "publishdate" desc limit $2 offset $1';  articleid | publishdate  25 | "2015-08-19 15:33:37" 26 | "2015-08-19 17:05:42" 27 | "2015-08-19 17:06:05" 28 | "2015-08-19 17:06:22" 29 | "2015-07-19 17:06:46" 30 | "2015-08-19 17:08:11" 

since value of articleid can in where clause try this

select *  article  articleid >= 28 , articleid <= 28 + 3 

or if articleid not consecutive

select *  article  articleid >= 28  order articleid limit 3  

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -