PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC] ); echo "=== sys_file unter submarket_import/ ===\n"; foreach ($pdo->query("SELECT uid, identifier, name FROM sys_file WHERE identifier LIKE '/submarket_import/%'") as $row) { echo " #{$row['uid']} {$row['identifier']}\n"; } echo "\n=== tt_content auf Seite 443 (Slots 110-160): Datei-Zaehler ===\n"; foreach ($pdo->query("SELECT uid, CType, colPos, vitec_bgimage, vitec_image, vitec_video_cover FROM tt_content WHERE deleted = 0 AND pid = 443 AND colPos >= 110 ORDER BY colPos") as $row) { echo " #{$row['uid']} {$row['CType']} (colPos {$row['colPos']}): bgimage={$row['vitec_bgimage']} image={$row['vitec_image']} video_cover={$row['vitec_video_cover']}\n"; } echo "\n=== sys_file_reference auf diese Elemente ===\n"; $stmt = $pdo->query("SELECT r.uid, r.uid_local, r.uid_foreign, r.fieldname, r.deleted, r.hidden, f.identifier FROM sys_file_reference r LEFT JOIN sys_file f ON f.uid = r.uid_local WHERE r.tablenames = 'tt_content' AND r.uid_foreign IN (SELECT uid FROM tt_content WHERE pid = 443 AND colPos >= 110)"); $found = 0; foreach ($stmt as $row) { $found++; echo " ref #{$row['uid']} -> CE #{$row['uid_foreign']} field {$row['fieldname']} file {$row['identifier']} deleted={$row['deleted']} hidden={$row['hidden']}\n"; } if ($found === 0) { echo " KEINE Referenzen gefunden.\n"; }