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
| <?php
$sql2 = "SELECT COUNT(commentaires.num_com) AS com, commentaires.nom_dep, commentaires.com_dep,commentaires.num_photo, photos.num_photo, photos.nom_photo, photos.img_photo, photos.vig_photo, photos.ouverture_photo, photos.vitesse_photo, photos.focale_photo, photos.iso_photo, photos.type_photo, photos.num_album
FROM commentaires
JOIN photos ON commentaires.num_photo = photos.num_photo
WHERE photos.num_photo = ".(int)$_GET['numphoto'];
$result2 = mysql_query($sql2) or die ('Erreur SQL : impossible d\'effectuer la requête : <br />'.$sql2);
while ($row2 = mysql_fetch_array($result2)) {
if ($row2['com']==0) { }
else {
echo '<tr>';
echo '<td width="610" height="10" background="images/menu/espaceh.png"></td>';
echo '</tr>';
echo '<tr>';
echo '<td width="610" height="20" background="images/menu/com01L.png" align="left" valign="middle"><span class="exifs"> Déposant : <span class="titre">'. $row2['nom_dep'] .'</span></span></td>';
echo '</tr>';
echo '<tr>';
echo '<td width="610" height="76" background="images/menu/com02L.png" valign="top">
<table><tr><td width="1"></td>
<td><span class="texte">'. $row2['com_dep'] .'</span></td>';
echo '</tr></table>';
echo '</td>';
echo '</tr>';
}
echo '</table>';
echo '</td>';
echo '</tr>';
echo '</table>';
}
?> |
Partager