limitby=(a,b) gives you records with a<=number<b, NOT a<=number<a+b. In other words, b is not the SQL LIMIT value. You can do
lamps = db().select(db.lamps.ALL, limitby=(offset, offset+limit)) On Jun 10, 10:28 am, Junaid P V <junu...@gmail.com> wrote: > Hi, > > I have a database of lamps, I was trying to show paginated records from > lamps table. > I could not find limitby working. > > My code is: > > lamps = db().select(db.lamps.ALL, limitby=(offset, limit)) > > But, I get records only in the rage 0 to limit starting from offset > > To clarify, if I have 7 records in lamps table and I give offset = 2 and > limit 4, I get only two records from offset 2 > > Could somebody help me please??