Bonjour à tous, j'aimerais remplacer ce tableau par un texte du genre "Aucun animateur en ce moment" si la table mysql est vide
Aidez-moi svp car je gelère depuis 15 jours
Merci de votre aide
<?php
$heure=date("G");
$commaff= mysql_query("SELECT * FROM ".T_ANIMATEUR." WHERE heuredebut<='$heure' AND heurefin>='$heure'+1 ORDER BY id LIMIT 1");
while ($donnees = mysql_fetch_array($commaff))
{
$jour=date("w");
$jourbd=$donnees['jour'];
$journee = explode(",", $jourbd);
$max=45;
$chaine=$donnees['bio'];
if(strlen($chaine)>=$max)
{
$chaine=substr($chaine,0,$max);
$espace=strrpos($chaine," ");
if($espace)
$chaine=substr($chaine,0,$espace);
$chaine .= ' ...';
}
$numero=$donnees[0];
for($i=0;$i<sizeof($journee);$i++)
{
if($jour==$journee[$i]){
echo'
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="6%" valign="top"><table width="81" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="81" valign="top" ><div> <span ><a href="'.$donnees['url'].' "><img src="images/animateur/'.$donnees['photo1'].' " width="80" height="80" border="0" class="glossy iradius"></a></span></div></td>
</tr>
</table></td>
<td width="94%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td><div align="left"class="encemoment" ><strong><a href="'.$donnees['url'].'">'.stripslashes ($donnees['nomprenom']).'</a></strong></div>
<em>de '.stripslashes ($donnees['heuredebut']).'h à '.$donnees['heurefin'].'h</em></td>
</tr>
</table></td>
</tr>
</table>
<div align="center">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
http://fpdownload2.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="108" height="25" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="images/antenne.swf" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="bgcolor" value="#000066" />
<embed src="images/antenne.swf" menu="false" quality="high" wmode="transparent" bgcolor="#000066" width="108" height="25" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="
https://get.adobe.com/flashplayer/" />
</object>
</div>
';
}
}
}
?>