<?php
require_once 'config.php';
$cnt = $pdo->query("SELECT COUNT(*) FROM wedding_gallery")->fetchColumn();
echo "案例总数: $cnt\n";
$rows = $pdo->query("SELECT id, title, type FROM wedding_gallery ORDER BY sort_order")->fetchAll();
foreach ($rows as $r) {
    echo "  ID{$r['id']}: {$r['title']} [{$r['type']}]\n";
}