pratikbackend / check_db.py
Antaram's picture
Upload 96 files
7647b38 verified
Raw
History Blame Contribute Delete
354 Bytes
import sqlite3
conn = sqlite3.connect('mirchi_trading.db')
cursor = conn.execute("SELECT name FROM sqlite_master WHERE type='table'")
print('Tables:', [row[0] for row in cursor.fetchall()])
cursor = conn.execute("SELECT id, name, is_active FROM mirchi_types")
print('\nAll mirchi types:')
for row in cursor.fetchall():
print(f' {row}')
conn.close()