Skip to content

Instantly share code, notes, and snippets.

@lavarini
Created September 29, 2013 19:03
Show Gist options
  • Save lavarini/6755500 to your computer and use it in GitHub Desktop.
Save lavarini/6755500 to your computer and use it in GitHub Desktop.
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