So when you call the DAL object (in this case db) it makes and SQLObject
which holds information about the current SQL.

Those SQLObjects are also callable just like the DAL object. Whenever you
call an SQLObject, the filters that get passed as arguments to the function
get AND'ed to the query and the call function returns the resulting new
query.

You can do something cool like this

people = db(db.people.validated_email == True)

paying_mbers = people(db.people.money_spent > 0)
non_paying_mbers = people(db.people.money_spent == 0)
mbers_who_like_pie = people(db.people.like_pie == True)

--
Thadeus




On Fri, Oct 22, 2010 at 12:45 PM, Jason Brower <encomp...@gmail.com> wrote:

>  WOAH ! That was cool!
> BR,
> Jason
>
>
> On Fri, 2010-10-22 at 12:15 -0500, Thadeus Burgess wrote:
>
>
> qry = db()
>
> for token in request.vars.value.split(' '):
>   qry = qry(db.furniture.category.upper().like('%' + token.upper() + '%')
>
> --
> Thadeus
>
>
>
>
> On Fri, Oct 22, 2010 at 12:12 PM, Jason Brower <encomp...@gmail.com>
> wrote:
>
> d this works with one string of works...
> but I would like to look for items sigul
>
>
>
>

Reply via email to