pb avec tableau array
Posté : 31 déc. 2007, 18:28
Salut,
J'ai une erreur sur ma requete dans un tableau j'ai a chaque fois un Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
Ci joint le code c'est etrange

J'ai une erreur sur ma requete dans un tableau j'ai a chaque fois un Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
Ci joint le code c'est etrange
$demande_liste = array('Recherche demploi', 'Administratif (LM, CV)', 'Orientation vers AIDE', 'Orientation vers ASI', 'Orientation vers réf. PLIE', 'Orientation vers Org.formation', 'Orientation vers ML', 'Orientation vers REC A', 'Orientation vers REC C', 'Orientation vers REC T', 'Orientation vers REC V', 'Orientation vers autre', 'Formation', 'Autre');
$str = "$data[11]"; //$data[11] contient 1 2 3 etc
$champs = explode ("," , $str);
while ($row = mysql_fetch_array($demande_liste))
{
if (in_array($row[0], $champs) )
{
echo $row[1];
}
else
{
//Rien
}
}
Merci et bonnes fetes a tous