Got a problem, would appreciate any help on it.
I want to remove a row, which was transferred to my func from a variable. That's the code:
con = sql.connect('db.sqlite')
cur = con.cursor()
query = 'delete from media_tmp where media_id="%s"' % media_id.strip()
print(query)
cur.execute(query)
if con:
con.close()
print(query) gives me the following:
delete from media_tmp where media_id="737589711821419460_184456611"
and when I execute that directly in sqlite, it works perfectly and removes the deserved row. but executed by cur.execute(query) doesn't work at all.
The func finishes good, I got no errors.