Last active
June 2, 2022 15:00
-
-
Save llbbl/a9ea97494cbf8ee81aeba892c41b5967 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sql = "INSERT INTO likes ( user_id, post_id ) VALUES ( %s, %s )" | |
val = [(4, 5), (3, 4)] | |
cursor = connection.cursor() | |
cursor.executemany(sql, val) | |
connection.commit() | |
print("query executed") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment