TIF_E41253310/scripts/checks/check_khosnol_db.py

9 lines
288 B
Python

import sys
sys.path.append('Backend')
from app.config.database import engine
from sqlalchemy import text
with engine.connect() as conn:
res = conn.execute(text("SELECT id, nim, nama, tahun_lulus FROM alumni WHERE nama LIKE '%KHOSNOL%';")).fetchall()
print("Khosnol in DB:", res)