It works:
>>> q = ~(db.auth_user.id == 1)
I don't like that way either, but is the example in the book correct or it
should be fixed?
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving ema
~ is an unary operator and has precedence over binary operators, that's why
the error pops out.
~db.person.name=='Alex' should be db.person.name!='Alex', and ~db.person.
name should be used in orderby=...
I don't like the ~(db.auth_user.id==0). I'm not even sure if it works.
Marin
On Tue, Jan
Sorry, here's the actual error:
>>> db(q).select()
...
OperationalError: near "DESC": syntax error
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+
3 matches
Mail list logo