Here it comes:
db(db.projects.is_active == True).select
(orderby=~db.projects.due_date)

The info for building this and learning is all on AlterEgo or in
slides.

/R

On Jun 25, 6:23 am, Michael <michael.no...@gmail.com> wrote:
> Yea I read over the slides. I'm just having a tough time learning on
> how to write efficient queries.
>
> I think a good project for me would be to write a 'query' builder so I
> can better understand.
>
> A better example of what I'm specifically looking to do;
>
> I have a table called 'projects', I want to query that table and
> return items that are only active (projects.is_active) and then sort
> them by
> the closest due date (projects.due_date)
>
> I hope that makes sense.
>
> On Jun 24, 5:19 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > Did you look into the slides posted on the web page? If you give us a
> > more concrete example we can help more.
>
> > On Jun 24, 3:46 pm, Michael <michael.no...@gmail.com> wrote:
>
> > > Hey guys, How would I go about writing a more advanced filtering
> > > method for a query?
>
> > > for instance, If i want to query a table, then sort through that data
> > > such as the date, is the record active or not, etc.
>
> > > Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to