j'ai un problem avec mon code php. J'ai dévellopé ce code en local avec easyPhp cela fonctionné maintenant sur mon hebergeur web il me marque les erreurs suivante:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/jbkitesp/public_html/inc-top.php on line 29
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/jbkitesp/public_html/inc-top.php on line 35
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/jbkitesp/public_html/inc-top.php on line 39
voilà mon code!!!!
_________________________________________________________
//-- Execution des requetes pour sortir aléatoirement une bannière---
$Req ="SELECT * FROM $Table";
$Result= mysql_query($Req);
$NbLignes = mysql_num_rows($Result);
srand (time());
$Num=(rand()%$NbLignes);
$Num++;
$Req2="SELECT * FROM $Table WHERE id=\"$Num\"";
$Banniere=mysql_query($Req2);
$row=mysql_fetch_row($Banniere);
$Url=$row[1];
$fichier=$row[2];
$lien=$row[3];
mysql_free_result($Banniere);
//-----------------------------------------------------------------------
//------- Afficher la banniere ---------------------
echo "<a href=\"http://".$row[3]."\"><img src=\"".$row[1]."/".$row[2]."\" border=\"0\"></a>";