Bonjour,
Je n'arrive pas a faire marcher ma requête préparée, si quelqu'un peu me dire d'où provient l'erreur ...
Voici mon code :
Merci par avance pour votre aide
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 try{ $connexion = new PDO('mysql:host=localhost;dbname=si', 'root', 'root');; $res = $connexion->prepare('SELECT formation.LibelleFormation, trombinoscope.NumTrombinoscope, trombinoscope.AnneeTrombinoscope FROM formation, trombinoscope WHERE trombinoscope.IdFormationTrombi=formation.idFormation and trombinoscope.NumTrombinoscope = ?'); $res->execute(array($_GET['recordID'])); while ($donnees = $req->fetch()){ $formation=$donnees['LibelleFormation']; $annee=$donnees['AnneeTrombinoscope']; $num=$donnees['NumTrombinoscope']; } $res->closeCursor(); echo "Formation : $formation"; echo "Annee : $annee"; echo "Numero : $num"; }catch (PDOException $erreur) { echo "<p>Erreur : " . $erreur->getMessage() . "</p>\n"; };![]()
Partager