Commit inicial
This commit is contained in:
16
logs.py
Normal file
16
logs.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import psycopg2
|
||||
from psycopg2.extras import DictCursor
|
||||
|
||||
conn = psycopg2.connect(
|
||||
dbname='adcfi',
|
||||
user='postgres',
|
||||
password='Ultr4p0d3r0s0##',
|
||||
host='200.13.89.42',
|
||||
port='5432'
|
||||
)
|
||||
|
||||
with conn.cursor(cursor_factory=DictCursor) as cur:
|
||||
cur.execute("SELECT * FROM calificaciones.calificaciones_log ORDER BY log_timestamp DESC LIMIT 10")
|
||||
|
||||
for row in cur:
|
||||
print(row)
|
||||
Reference in New Issue
Block a user