18 lines
510 B
Python
18 lines
510 B
Python
import sys, os
|
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
|
|
from database import TradeDB
|
|
|
|
db = TradeDB()
|
|
try:
|
|
# 컬럼명 정확히 확인
|
|
cols = [dict(r)["Field"] for r in db.conn.execute("SHOW COLUMNS FROM env_config").fetchall()]
|
|
print("[env_config 컬럼]:", cols)
|
|
|
|
# 샘플 row 보기
|
|
sample = db.conn.execute("SELECT * FROM env_config LIMIT 3").fetchall()
|
|
print("[샘플 rows]:")
|
|
for r in sample:
|
|
print(" ", dict(r))
|
|
finally:
|
|
db.close()
|