Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
560 B
1
Indexable
Never
    $requeteSupprimerParticipants = $database->prepare("DELETE FROM sessionp WHERE IDS = ? AND IDP NOT IN (" . implode(',', $nouveauxParticipants) . ")");
    $requeteSupprimerParticipants->execute([$IDS]);

    // Ensuite, mettre à jour ou insérer les participants sélectionnés
    foreach ($nouveauxParticipants as $idParticipant) {
        $requeteUpdateParticipant = $database->prepare("INSERT INTO sessionp (IDS, IDP) VALUES (?, ?) ON DUPLICATE KEY UPDATE IDS = IDS");
        $requeteUpdateParticipant->execute([$IDS, $idParticipant]);
    }
Leave a Comment