That solved it. Thanks a lot!
On Wednesday, July 12, 2017 at 6:06:43 PM UTC+5:30, Leonel Câmara wrote:
>
> Put some parenthesis on it
>
> Instead of this
>
> db(db.all_users.status==1 & db.all_users.username!='John' )
>
> Do:
>
> db((db.all_users.status==1) & (db.all_users.username!='John' )))
>
Put some parenthesis on it
Instead of this
db(db.all_users.status==1 & db.all_users.username!='John' )
Do:
db((db.all_users.status==1) & (db.all_users.username!='John' )))
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source
Actually I've already put a query in it. Currently it ready all active
users as follows
db.table.input_email.requires=IS_IN_DB(db(db.all_users.status==1),
'all_users.username')
And I want to further some users based on their name say John so the
condition should fulfill all active users but
i think you can put query on that
e.g.
db.person.name.requires = IS_IN_DB(db(db.person.id > 10), 'person.id',
'%(name)s')
ref:
http://web2py.com/books/default/chapter/29/07/forms-and-validators#Database-validators
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book
4 matches
Mail list logo