CoolFace
Apppublic

malepati/custom_template_working

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes
list_lay_codes.py25 linesDownload Raw Back to root
1import sqlite32 3db_path = r"c:\Users\DELL\Documents\upgrading\Accusaga_slides_presentation\servers\fastapi\app_data\fastapi.db"4pid = "d1e68e2ac44f4a85b4db00499b36060a"5 6conn = sqlite3.connect(db_path)7cursor = conn.cursor()8 9cursor.execute("SELECT layout_id, layout_name, id FROM presentation_layout_codes")10rows = cursor.fetchall()11 12print(f"Searching for PID: {pid}")13for l_id, l_name, db_id in rows:14    # We need to find which ones belong to this PID15    # but I don't have the presentation column and I can't filter it accurately without knowing the format.16    pass17 18# Let's just print the last 10 entries in the table19print("\nLast 10 entries in presentation_layout_codes:")20cursor.execute("SELECT presentation, layout_id, layout_name, created_at FROM presentation_layout_codes ORDER BY created_at DESC LIMIT 10")21for row in cursor.fetchall():22    print(row)23 24conn.close()25