updated maildb state
This commit is contained in:
parent
b463307259
commit
a9d5a8762d
@ -50,7 +50,8 @@ def CreateDB(conn, cursor):
|
|||||||
|
|
||||||
def InsertMail(conn, cursor, sender, recipient, content):
|
def InsertMail(conn, cursor, sender, recipient, content):
|
||||||
try:
|
try:
|
||||||
cursor.execute(f"INSERT INTO mail (sender, recipient, content) values ('{sender}','{recipient}','{content}');")
|
cursor.execute("PREPARE InsertMail as INSERT INTO mail (sender, recipient, content) values ($1, $2, $3);")
|
||||||
|
cursor.execute("EXECUTE InsertMail (%s, %s, %s);", (sender, recipient, content))
|
||||||
conn.commit()
|
conn.commit()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
Loading…
Reference in New Issue
Block a user