Answer the question
In order to leave comments, you need to log in
Empty SQL response of psycop2 query, but when querying via console it returns a string?
def show_all_orders():
conn = try_connect()
cursor = conn.cursor()
try:
rows = cursor.execute("SELECT * FROM orders")
conn.commit()
conn.close()
cursor.close()
print('Записи таблицы orders получены')
return rows
except Exception as e:
print(f'Ошибка выборки записей orders: {str(e)}')
print('Окончание запроса к таблице orders')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question