You do not have permission to delete messages in this group
Copy link
Report message
Sign in to 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 PyMySQL Users
Hello guys,
I want to execute this statement "SELECT something FROM table WHERE field IN (1,2,3...)" the question is, how to build such a query in PyMySQL where I want use "IN" statement.
best wishes, Peter Bocan.
INADA Naoki
unread,
Aug 21, 2017, 5:28:10 AM8/21/17
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
Sign in to 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 pymysq...@googlegroups.com
1. Use ORMs
2. cur.execute(f"SELECT ... IN ({','.join('?' for _ in range(len(ids)))})", ids)
INADA Naoki <songof...@gmail.com>
> --
> You received this message because you are subscribed to the Google Groups
> "PyMySQL Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pymysql-user...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.