mirror of
https://github.com/IgorL123/mafia_api.git
synced 2026-09-24 07:30:15 +00:00
mod4
This commit is contained in:
@@ -21,7 +21,7 @@ def query_ins_user(tui, curs):
|
|||||||
print("Ошибка:", e)
|
print("Ошибка:", e)
|
||||||
|
|
||||||
|
|
||||||
def query_ins_chat(tci, curs=cursor):
|
def query_ins_chat(tci, curs):
|
||||||
try: # Запрос добавления чата
|
try: # Запрос добавления чата
|
||||||
curs.execute(
|
curs.execute(
|
||||||
f"""INSERT into public.Chats(TrueChatID, StateID) values ({tci}, 0)""")
|
f"""INSERT into public.Chats(TrueChatID, StateID) values ({tci}, 0)""")
|
||||||
@@ -30,7 +30,7 @@ def query_ins_chat(tci, curs=cursor):
|
|||||||
print("Ошибка:", e)
|
print("Ошибка:", e)
|
||||||
|
|
||||||
|
|
||||||
def query_sel(query, curs=cursor):
|
def query_sel(query, curs):
|
||||||
try:
|
try:
|
||||||
# Запрос вывода из БД
|
# Запрос вывода из БД
|
||||||
curs.execute("SELECT * FROM chats")
|
curs.execute("SELECT * FROM chats")
|
||||||
@@ -48,5 +48,5 @@ def query_change(x):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def close(cur=cursor, connection=connection):
|
def close(cur):
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user