Registration key

33 views
Skip to first unread message

Paco Bernal

unread,
Nov 22, 2019, 3:42:49 PM11/22/19
to web2py-users
Hi all

Today my mind is a little heavy but can't wait till tomorrow

Why

db((db.auth_user.registration_key=='')|(db.auth_user.registration_key==None)).count()

gives me 2 and

db(db.auth_user.registration_key!='blocked').count()

gives me 1 when I use only 'blocked' to block users?

Thanks for the support


Val K

unread,
Nov 23, 2019, 1:45:10 AM11/23/19
to web2py-users
Because null (none) has special meaning in sql and can't be compared, so you should use explicit comparison with null (none)
Reply all
Reply to author
Forward
0 new messages