From 91f5cdf483c622166734c11280f482f13bcb8953 Mon Sep 17 00:00:00 2001 From: Pavel_Duron Date: Mon, 7 Nov 2022 20:08:19 +1000 Subject: [PATCH] =?UTF-8?q?=D1=82=D1=81=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sql.py b/sql.py index 6b1e2cf..65d344e 100644 --- a/sql.py +++ b/sql.py @@ -11,12 +11,12 @@ async def db_start(): #подключение к бд db.commit() async def add_user(): - cur.execute('''INSERT INTO users (users_id, user_name) VALUES (?, ?)''',[id1, fullname1]) - db.commit() + await cur.execute('''INSERT INTO users (users_id, user_name) VALUES (?, ?)''',[id1, fullname1]) + await db.commit() async def close(): - db.commit() - db.close() + await db.commit() + await db.close()