Bonjour,
est-il possible de récupérer le contenu d'une requête SQL complète incluant les valeurs des bindParam ?
Avec :j'aimerais récupérer :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 $sth = $cnxPDO->prepare($sql); $sth->bindParam(':id', 1, PDO::PARAM_INT); $sth->bindParam(':civilite', 'Mr', PDO::PARAM_STR, 4); $sth->bindParam(':nom', 'DUPOND', PDO::PARAM_STR, 50); $sth->bindParam(':prenom', 'Albert', PDO::PARAM_STR, 50); $bOK = $sth->execute(); $sth->bindParam(':id', 2, PDO::PARAM_INT); $sth->bindParam(':civilite', 'Mme', PDO::PARAM_STR, 4); $sth->bindParam(':nom', 'RUAUD', PDO::PARAM_STR, 50); $sth->bindParam(':prenom', 'Rose', PDO::PARAM_STR, 50); $bOK = $sth->execute();plutôt que :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 UPDATE `t_personne` SET civilite="Mr", nom="DUPOND", prenom="Albert", WHERE id=1 LIMIT 1; UPDATE `t_personne` SET civilite="Mme", nom="RUAUD", prenom="Rose", WHERE id=2 LIMIT 1;Faisable ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 UPDATE `t_personne` SET civilite=:civilite, nom=:nom, prenom=:prenom, WHERE id=:id LIMIT 1; UPDATE `t_personne` SET civilite=:civilite, nom=:nom, prenom=:prenom, WHERE id=:id LIMIT 1;
Merci d'avance...
Partager