Created
September 29, 2013 19:03
-
-
Save lavarini/6755500 to your computer and use it in GitHub Desktop.
This file contains 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 = '(' | |
for i in manga['genres']: | |
id_genre = genres_list.index(i) + 1 | |
sql_insert += "%s, %s),("%(id_manga, id_genre) | |
sql_insert = sql_insert[:-2] | |
sql = "INSERT INTO mangafox_genre (id_genre, id_mangafox) VALUES %s"%(sql_insert) | |
cur.execute(sql) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment