[web2py] Re: Selecting a few latest records

2010-11-14 Thread Ruiwen Chua
Ah got it, thanks =) Missed that bit. On Nov 13, 8:40 pm, villas wrote: > Hi Ruiwen, > > See also 'orderby' in the book. Do something like this: > > db().select(db.person.ALL, orderby=~db.yourtable.created_date, > limitby=(0, 15)) > > Don't overlook the tilde (~), this is important because it mak

[web2py] Re: Selecting a few latest records

2010-11-13 Thread villas
Hi Ruiwen, See also 'orderby' in the book. Do something like this: db().select(db.person.ALL, orderby=~db.yourtable.created_date, limitby=(0, 15)) Don't overlook the tilde (~), this is important because it makes reverse order i.e. latest dates first -D On Nov 13, 10:10 am, Ruiwen Chua wrote: