Untitled

 avatar
unknown
plain_text
a year ago
560 B
2
Indexable
    $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]);
    }
Editor is loading...
Leave a Comment