Commit b319b758 authored by Vasyl Bodnaruk's avatar Vasyl Bodnaruk

Refactor update function

parent 0488ae61
......@@ -38,8 +38,9 @@ class Database:
except:
self.cursor.rollback()
def update(self, query):
self.cursor.execute(query)
def update(self, query, data):
self.cursor.execute(query, (data))
return self.cursor.lastrowid
if __name__ == '__main__':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment