Resultat d'une requête dans tableau à 4 dim

Fermé
wada - 17 févr. 2009 à 17:11
 wada - 17 févr. 2009 à 17:55
Bonjour,
Bonjour à tous!

je cherche à transferer le resultat d'une requête mysql dans un tableau à 4 dimensions pour exploiter le tableau par la suite.....mais je ne sais pas trop comment m'y prendre malgré les nombreux posts que j'ai pu lire à ce sujet.
ma table a 4 champs
comment récupérer distinctement dans le tableau chacune des lignes avec chacun des champs??
quelqu'un pourait-il me donner un coup de main???
grand merci d'avance

1 réponse

Mikey_UFC Messages postés 312 Date d'inscription jeudi 8 mars 2007 Statut Membre Dernière intervention 2 août 2010 1
17 févr. 2009 à 17:32
Salut,

$i = 0;
while($rst = mysql_fetch_array($query))
{
$tab[$i]["champ_1"] = $rst["nom_du_champ_1"];
$tab[$i]["champ_2"] = $rst["nom_du_champ_2"];
$tab[$i]["champ_3"] = $rst["nom_du_champ_3"];
$tab[$i]["champ_4"] = $rst["nom_du_champ_4"];
$i++;
}
0
merci à toi Mikey_UFC
j'essaie ça et te tiens au courant

à +
0