1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| ...
$query_produits = sprintf("SELECT * FROM produit p ".
"WHERE p.FamilleProduit_idFamilleProduit = %s ".
"ORDER BY p.nomProduit ASC", $colname_produits);
//}
$produits = mysql_query($query_produits, $base) or die(mysql_error());
$row_produits = mysql_fetch_assoc($produits);
$totalRows_produits = mysql_num_rows($produits);
...
<h2>Nos produits </h2>
<? if($totalRows_produits > 0){ ?>
<ul id="vente">
<? do{ ?>
<li><a href="product.php?idProduit=<? echo $row_produits['idProduit']; ?>"><img src="../assets/images/products/<? echo $row_produits['petiteImageProd']; ?>" width="100" height="75" border="0" /></a>
<p><a href="product.php?idProduit=<? echo $row_produits['idProduit']; ?>" ><? echo $row_produits['nomProduit']; ?><br />
</a></p>
<p></p>
</li>
<? } while ($row_produits = mysql_fetch_assoc($produits)); ?>
</ul>
<? }else{ ?>
Aucun produit trouvé
<? } ?>
... |
Partager