Shackles

Thorsteinn Einarsson
2021
1.336 Aufrufe
Video funktioniert nicht?
Produkt erhältlich bei:
// ============================================================ // VIDEOCHARTS – NUR AUS CHARTSLISTEN, NICHT AUS video_count!!! // ============================================================ $videoPlacements = []; $DEBUG = isset($_GET['debug']); $videoId = (int)$product['id']; if ($DEBUG) { echo "
DEBUG MODE\n";
}

// --- 1. Charts-Eintrag „Aktuelle Musikvideos“ suchen ---
$sql = "SELECT id, content FROM charts WHERE type = 99 LIMIT 1"; 
// type=99 = Videocharts (dein System!)
$st = $pdo->query($sql);
$row = $st->fetch(PDO::FETCH_ASSOC);

if ($row) {
    $ids = preg_split('/\s+/', trim($row['content']));
    $ids = array_map('intval', $ids);

    if ($DEBUG) {
        echo "Gefundene Chartliste (".count($ids)." Einträge)\n";
    }

    $pos = array_search($videoId, $ids);
    if ($pos !== false) {
        $platz = $pos + 1;

        if ($DEBUG) echo "✔ Video in Aktuellen Charts gefunden → Platz $platz\n";

        $videoPlacements[] = [
            'label' => 'Aktuelle Musikvideos Top 150',
            'pos' => $platz,
            'url' => '/videos/charts/'
        ];
    } else {
        if ($DEBUG) echo "❌ Nicht in Aktuellen Charts gefunden\n";
    }
}

Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'type' in 'WHERE' in /www/htdocs/w00e9fe0/mix1.de/videos/detail.php:1650 Stack trace: #0 /www/htdocs/w00e9fe0/mix1.de/videos/detail.php(1650): PDO->query('SELECT id, cont...') #1 {main} thrown in /www/htdocs/w00e9fe0/mix1.de/videos/detail.php on line 1650