Untitled
unknown
plain_text
2 years ago
560 B
6
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