added function to insert data
This commit is contained in:
@@ -148,3 +148,12 @@ class Data_table(Table):
|
|||||||
';'
|
';'
|
||||||
)
|
)
|
||||||
self.execute(query, val_dict)
|
self.execute(query, val_dict)
|
||||||
|
|
||||||
|
def insert(username, timestamp, content):
|
||||||
|
val_dict = {
|
||||||
|
'username': username,
|
||||||
|
'time': timestamp,
|
||||||
|
'content': content
|
||||||
|
}
|
||||||
|
with Data_table() as dt:
|
||||||
|
dt.insert(val_dict)
|
||||||
Reference in New Issue
Block a user