1==0 is not a query in terms of web2py
even 1==db.prod.id is not valid, a field should be first
db.prod.id == 1 is a valid query
1==0 is a boolean not a query,
empty_result = db(db.prod.id<0).select() # I suppose that you don't have
negative ids :)
I wanted to create an empty data set, just to get the table structure,
but to avoid returning any records, due to large size of the table.
I'm using the MySQL and if I do it as bellow, seems that everything
goes into an infinite loop, where I thought it will just be as SELECT
* from Prod WHERE 1=0
3 matches
Mail list logo