This worked earlier, some of my rows have valid entries, but a lot of them don't...
def setLength(vid, seconds):
db_conn.execute("UPDATE Videos SET length= '" + str(seconds//1) + "' WHERE ID='"+str(vid)+"';")
db_conn.commit()
result = my_cursor.execute("SELECT length, title FROM Videos WHERE ID = " + "'" + str(vid) + "';")
for row in result:
print(vid, row[0])
print("gets here")
gives the output:
gets here
even when I run it with a valid ID.
Edit: I can use the same ID to get the title column from that row, but trying to UPDATE the length column just leaves the cell empty.