Re: [web2py] how to use Not belongs

2012-08-13 Thread Cliff Kachinske
Bruno's method is correct. With Postgres and psycopg2, make sure the array variable is not empty or wrap it in a try...except block. On Monday, August 13, 2012 7:34:55 AM UTC-4, rochacbruno wrote: > > use the unary ~ operator > > db(~db.table1.field1.belongs(array)).update(field2=False) > > Bru

Re: [web2py] how to use Not belongs

2012-08-13 Thread Bruno Rocha
use the unary ~ operator db(~db.table1.field1.belongs(array)).update(field2=False) Bruno Rocha www.rochacbruno.com.br Em 13/08/2012 05:21, "Pradeesh" escreveu: > In my control I have an array with so many values. > I want to write a dal query to update a table rows which having ID not in > this

[web2py] how to use Not belongs

2012-08-13 Thread Pradeesh
In my control I have an array with so many values. I want to write a dal query to update a table rows which having ID not in this array. I want something like this. db(db.table1.field1.notbelongs(array)).update(field2=False) I have tried like this db(db.table1.field1 not in(array)).update(field