Re: [web2py] Dynamically adding items to search for...

2010-10-22 Thread Thadeus Burgess
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

Re: [web2py] Dynamically adding items to search for...

2010-10-22 Thread Jason Brower
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

Re: [web2py] Dynamically adding items to search for...

2010-10-22 Thread Thadeus Burgess
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 wrote: > d this works with one string of works... > but I would like to look for items sigul >

[web2py] Dynamically adding items to search for...

2010-10-22 Thread Jason Brower
I currently have something like this... search_results = db( (db.furniture.category.upper().like(('%'+value +'%').upper())) | (db.furniture.description.upper().like(('%'+value+'%').upper())) | (db.furniture.category.upper().like(('%'+value+'%').upper())) | (db.furniture.category.upper().like