reef-passion 1456
| Posté : 01-03-2009 15:01
yop yop j'aurai besoin de vos lumières
j'ai ce code
$r=mysql_list_fields ("pinpin", "manoeuvre_agent");
$n=mysql_num_fields($r) ;
opentable();
for ($i=1; $i<$n; $i++) {
$uv1=mysql_field_name($r, $i);
$uv2=mysql_field_name($r, $i);
//$uvnom = mysql_query ("select $uv2 from manoeuvre_agent where $uv1 like '$uvselect' ");
print $uvselect;
//print $uvnom;
$result = mysql_query("select name,$uv1,type from manoeuvre_agent where name='$agent1' and $uv1 not like '$annee%' and type='$uvselect' or name='$agent2' and $uv1 not like '$annee%' and type='$uvselect' or name='$agent3' and $uv1 not like '$annee%' and type='$uvselect' or name='$agent4' and $uv1 not like '$annee%' and type='$uvselect' or name='$agent5' and $uv1 not like '$annee%' and type='$uvselect' or name='$agent6' and $uv1 not like '$annee%' and type='$uvselect' order by '$name'");
//echo $uvnom;
echo "<table width=\"95%\" cellpadding=\"5\" border=\"1\" align=\"center\"";
while (list($name, $uv1) = mysql_fetch_row($result)) {
echo "<tr>\n" .
" < td width=\"20%\" align=\"center\"><a href=\"!javascript!:void(0);\" !onclick!=\"window.open('modules/statistiques/listing.php', 'width=8 00, height=600, status=yes, toolbar=no, scrollbars=yes')\"><font color='red'><strong>$uv2</strong></font></td>\n" .
" < td width=\"60%\" align=\"center\">$name</td>\n" .
" < td width=\"20%\" align=\"center\" border=\"0\">$uv1</td>\n" .
" </tr>\n"; }
echo "</table><br>";
ma requête sql $result fonctionnait avant que je rajoute l'argument "and type=$uvselect" maintenant elle ne fonctionne plus
j'ai un renvoi du type
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /mnt/102/sdb/9/6/cis407/modules/statistiques/statistiques.php on line 57.
la variable $uvselect est bien récupérée (vérifié par le print). Euh je sais le code est un peu pourri
Je cale. Auriez vous une idée |