Bonjour,
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
function loadCommande(){
	$rsql = new mysql();
	$sql = "select nom_ste, commande.date_creation, nom_destination, adr_destination, commune, service, vehicule, value_pack, nombre_pack, poids_pack, description_pack
			from societe, commande, adresses_commande , commune, services, vehicule
			where societe.id = ". $_SESSION["idUser"]." 
			and commande.id_client = societe.id 
			and adresses_commande.id_cmd = commande.id
			and commune.id = adresses_commande.commune_destination
			and commande.id_service = services.id
			and vehicule.id = commande.id_vehicule";
			//echo $sql."<br>";
	if($query = $rsql->req_sql($sql)){
	//echo $this->rsql->nbr($query);
		while($donnees = $rsql->s_array($query)){
			$_arr["nomste"] = $donnees['nom_ste'] ;
			$_arr["date_creation"] = $donnees['date_creation'] ;
			$_arr["adr_destination"] = $donnees['adr_destination'] ;
			$_arr["nom_destination"] = $donnees['nom_destination'] ;
			$_arr["commune"] = $donnees['commune'] ;
			$_arr["service"] = $donnees['service'] ;
			$_arr["vehicule"] = $donnees['vehicule'] ;
			$_arr["value_pack"] = $donnees['value_pack'] ;
			$_arr["nombre_pack"] = $donnees['nombre_pack'] ;
			$_arr["poids_pack"] = $donnees['poids_pack'] ;
			$_arr["description_pack"] = $donnees['description_pack'] ;
			echo $_arr["service"]."<br>";
		}
		return $_arr;
	}
	return false;
}
echo sizeof(loadCommande());
Voilà mon code, et c est là ou se trouve le probleme.
normalement ce tableau doit me donner 2lignes comme retour. Alors qu il me retourne 11lignes et je sais pas comment il fait ça. A l interieur de la fonction, c est 2 lignes. Mais dans je fais un echo ça me donne 11lignes.

Quelqu'un peut m aider à trouver la solution ?
Merci