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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| <?php
// CNX et récupération des informations relatives aux coups de coeurs
require_once("db_connect.php");
//Requete des images
//Recuperation des donnees de coup2coeur et typeBien
$sql="SELECT * FROM coup2coeur C,typebien T
WHERE T.ref_bien=C.ref_bien";
$query=mysql_query($sql);
echo'<span>nos coups de coeur</span>';
echo'</br>';
//Affichage des données
while($data=mysql_fetch_array($query))
{
echo'<div><table width="200" border="0" cellspacing="1" cellpadding="2">
<tr>
<th width="97" rowspan="3" scope="col">';
$requete = 'SELECT ref_bien,img_nom FROM image WHERE ref_bien like'." '".$data['ref_bien']."'LIMIT 0,1";
$fetch=mysql_query($requete);
while ($data1= mysql_fetch_array($fetch))
{
echo ' <img class=cadre_image src="./images/'.$data1['ref_bien']."/".$data1['img_nom'].'" width="80"
height="60">';
};
echo'</th>
<th width="31" scope="col" class="cadre_blanc">'.$data['type'].'</th>
</tr>
<tr>
<th scope="col">'.substr($data['description'],0,34).'...</th>
</tr>
<tr>
<th scope="col">Prix: '.$data['prix'].'CFA'.'</th>
</tr>
<tr align="center">
<th scope="col" > <a href="coup2coeur.php#'.$data['ref_bien'].'" target="_self"">ReF: '.$data['ref_bien'];
echo'</a></th>
</tr>
</table></div>';
}
?> |
Partager