SVP je veux afficher les données d’une réclamation qui concerne un patient, je saisie ce code mais il me donne erreur Fatal error: Call to a member function fetchAll() on boolean
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <?php include("basededonnee.php"); $nom = $_POST['nom']; $cin = $_POST['cin']; $query="SELECT objet,commentaire,nom_service, reclamation.id_service, service.id_service, patient.id_patient, reclamation.id_patient FROM `reclamation`, `service`,`patient` WHERE reclamation.id_service = service.id_service AND reclamation.id_patient = patient.id_patient AND nom =? AND cin =?"; $stat= $bdd->query($query); $tab= $stat->fetchAll(); foreach($tab AS $row){ echo' <div class="clr"></div> <div class="comment"> <a href="#"><img src="images/letter.png" width="40" height="40" alt="" class="userpic" /></a> <p> '.$row['objet'].'<br/> '.$row['nom_service'].'</p> <p>'.$row['commentaire'].'</p></div> '; } ?> |
+0
-0