Groups
Sign in
Groups
web2py-users
Conversations
Labels
About
Send feedback
Help
Does anyone know if web2py supports the IN operator in a query?
34 views
dal
query
Skip to first unread message
João Matos
unread,
Apr 16, 2019, 11:07:48 AM
4/16/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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 AM
4/16/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web...@googlegroups.com
The solution is .belongs()
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=belongs#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