Select from where

duke -  
 zip -
slt

$req = mysql_query("SELECT qtarticlestok, nomarticle from article where nomarticle = $listart");
$resultat = mysql_fetch_array($req);
echo"$resultat[qtarticlestok]";

donne Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\sitesweb\tp1\ajoutok.php on line 34

vous voyez pas pkoi ? SSVVPP

3 réponses

XeL-mEvo Messages postés 3 Statut Membre 8
 
$req = mysql_query("SELECT qtarticlestok, nomarticle from article where nomarticle='$listart' "); 
$resultat = mysql_fetch_array($req); 
echo $resultat["qtarticlestok"];
7
duke
 
en effet Xtra thx
1
zip
 
essaie while ($affiche =mysql_fetch_array($req){
echo $afiche[0];
echo $affiche[1];
------
echo $affiche[2];
}
comentaire
en effet mysql_fetch_array renvoi un tableau alors faut declarer une varable tableau pour recuperer les données !!!
jespere ke ca taidera
-2