Cool thanks Bruno!
On Sat, Nov 20, 2010 at 8:30 AM, Bruno Rocha <rochacbr...@gmail.com> wrote: > > Not mentioned in the book that you can get the NOT IN SQL expression > > my_list = [1,2,3,4] > > NOT IN LIST: db(~(db.product.id.belongs(my_list))).select() > > IN LIST: db(db.product.id.belongs(my_list)).select() > > > 2010/11/19 Bruno Rocha <rochacbr...@gmail.com> > > http://web2py.com/book/default/chapter/06#belongs >> >> >> >> 2010/11/19 Phyo Arkar <phyo.arkarl...@gmail.com> >> >> GOT IT >>> >>> db.table.key.belongs >>> >>> >>> I cant find it in web2py book is there is? >>> >>> >>> On Sat, Nov 20, 2010 at 8:11 AM, Phyo Arkar <phyo.arkarl...@gmail.com>wrote: >>> >>>> This can be done in Query easily as >>>> >>>> SELECT * FROM table WHERE table.id IN (1,2,4,5) >>>> >>>> Theres no DAL equvlient ? i have to execute SQL? >>>> >>>> >>>> On Sat, Nov 20, 2010 at 8:00 AM, Phyo Arkar >>>> <phyo.arkarl...@gmail.com>wrote: >>>> >>>>> Eratta : >>>>> >>>>> >>>>> >>>>> >>>>> to_get=[1,2,4,5] >>>>> >>>>> q= db.casedb.id in to_get # Guess this wont work? >>>>> >>>>> db(q).select(db.casedb.ALL) >>>>> >>>>> On Sat, Nov 20, 2010 at 7:54 AM, Phyo Arkar >>>>> <phyo.arkarl...@gmail.com>wrote: >>>>> >>>>>> >>>>>> to_get=[1,2,4,5] >>>>>> >>>>>> q= db.casedb.id in toget >>>>>> db(q).select(db.casedb.ALL) >>>>> >>>>> >>>>> >>>> >>> >> >> >> -- >> >> Bruno Rocha >> http://about.me/rochacbruno/bio >> > > > > -- > > Bruno Rocha > http://about.me/rochacbruno/bio >