Feb-13-2019, 06:35 PM
sorry, I am not a nice English speaker. sometimes I mnot totally clear when I try to write what I think.
if I understand the real meaning of your answer, you say without the print everything is running nicely, don't you?
but I ran my code without it and I obtained the same result, I added it to know what is the matter.
so now my problem is solved, I just added an "or genre is null" like that:
if I understand the real meaning of your answer, you say without the print everything is running nicely, don't you?
but I ran my code without it and I obtained the same result, I added it to know what is the matter.
so now my problem is solved, I just added an "or genre is null" like that:
cur.execute('''INSERT OR IGNORE INTO Genre (genre) VALUES ( ? )''', (genre, )) cur.execute('SELECT id FROM Genre WHERE genre = ? OR genre IS NULL', (genre, )) genre_id = cur.fetchone()[0]thanks for your help