Bonsoir,
j'ai le message d'erreur suivant :
Notice: Object of class MDB2_Error could not be converted to int
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| // Récupère le nombre de ligne du résultat
$nbre_ligne_resultat = $resultat->numRows();
// Affiche toutes les lignes du résultat
for ($i=0; $i <$nbre_ligne_resultat; $i++) {
$ligne = $resultat->fetchRow(MDB2_FETCHMODE_ASSOC);
echo "<p><strong>".($i+1).". Titre: ";
echo htmlspecialchars(stripslashes($ligne['titre']));
echo "</strong><br />Auteur : ";
echo stripslashes($ligne['auteur']);
echo "<br />ISBN: ";
echo stripslashes($ligne['isbn']);
echo "<br />Prix : ";
echo stripslashes($ligne['prix']);
echo "</p>";
} |
Partager