Bonjour,
J'ai une erreur avec cette requête, mais je ne vois pas d'où elle vient :
	
	
	
		
Le fichier config.php est le suivant :
	
	
	
		
Le fichier qui appel la fonction :
	
	
	
		
Et l'erreur :
Pourriez-vous m'aider??
Merci.
				
			J'ai une erreur avec cette requête, mais je ne vois pas d'où elle vient :
		Code:
	
	<?php
include("config.php");
function listeconcours()
{
        $result = mysql_query("SELECT nomrewrit, url, titre, note FROM site_concours';");
        for($i=0; $row=mysql_fetch_array($result); $i++)
        {
                $list[$i]=$row;
        }
        return $list;	
}
?>
	Le fichier config.php est le suivant :
		Code:
	
	<?php
$dbh=mysql_connect ("xxxx", "xxxxx", "xxxxx") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("xxxxxx");
?>
	Le fichier qui appel la fonction :
		Code:
	
	<?php
require('functions.php');
$listeconcours=listeconcours();
?>
<?php
for($i=0; $i<count($listeconcours); $i++)
        echo "
<td> $listeconcours[$i][titre] </td>
<td> $listeconcours[$i][note]  </td>
<td> $listeconcours[$i][nomrewrit]  </td>
<td> $listeconcours[$i][url]  </td>
";
?>
	Et l'erreur :
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/concou27/public_html/functions.php on line 6
Pourriez-vous m'aider??
Merci.