If you want the newest first, it should be ~db.news.posted_on. Anthony
On Saturday, December 13, 2014 9:30:05 PM UTC-5, Jeremiah Peterson wrote: > > I'm having troubles getting the orderby to work with multiple columns, > perhaps I'm not understanding how it should work. > > I have news articles that get ranked based on the number votes and time > passed. > > What I'm trying to do is order the news articles first by rank, then if > the ranks are the same by the newest first. > > Here's what I'm doing now and it just seems to ignore what's after the | > > rows = db(db.news).select(orderby=~db.news.rank|db.news.posted_on, > limitby=limitby) > > Thanks for for looking. > Jeremiah > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

