Does anyone know if web2py supports the IN operator in a query?

34 views
Skip to first unread message

João Matos

unread,
Apr 16, 2019, 11:07:48 AM4/16/19
to web2py-users
Does anyone know if web2py supports the IN operator in a query?

Doesn't seem to accept this

db(db.wo.id in [1,2,3]).select()

that would translate to SQL like this

SELECT * FROM wo WHERE id IN (1, 2, 3)

João Matos

unread,
Apr 16, 2019, 11:17:29 AM4/16/19
to web...@googlegroups.com
The solution is .belongs()

Got help in the Telegram Web2py International Support Group at https://t.me/web2py_world/
Reply all
Reply to author
Forward
0 new messages