Description:
I made a table with four rows and want to delete forth row from the table. every thing is OK because when I check it in the following code it has disappeared but when I open it again by "DB Browser" or by using SELECT operator in another code, it still there and appears again.
import sqlite3
conn = sqlite3.connect('test.db')
print ("Opened database successfully")
conn.execute("DELETE from COMPANY where ID=4;")
conn.commit
print ("Total number of rows deleted :", conn.total_changes)
cursor = conn.execute("SELECT id, name, address, salary from COMPANY")
[print(row) for row in cursor.fetchall()]
print ("Operation done successfully")
conn.close()
ISSUE_TEMPLATE
DBFlow Version: SQLite (python)
Bug or Feature Request:
Description: I made a table with four rows and want to delete forth row from the table. every thing is OK because when I check it in the following code it has disappeared but when I open it again by "DB Browser" or by using SELECT operator in another code, it still there and appears again.
import sqlite3 conn = sqlite3.connect('test.db') print ("Opened database successfully") conn.execute("DELETE from COMPANY where ID=4;") conn.commit print ("Total number of rows deleted :", conn.total_changes) cursor = conn.execute("SELECT id, name, address, salary from COMPANY") [print(row) for row in cursor.fetchall()]
print ("Operation done successfully") conn.close()
It's DataBase: test.zip