Bonjour à toutes et à tous,

Je suis toujours avec mon classement par équipe dans mon site de résultats sportifs :

Suite à mon post :
http://<br /> http://www.developpez...ighlight=&#91;
qui résolvait si il n'y avait qu'une équipe en compétition.
Malheureusement et c'est normal lorsqu'il y a plusieurs équipes cela ne fonctionne pas.
Dans les clubs on désigne trois sportifs qui font partie de l'équipe, on additionne leurs points et on fait un classement pour l'équipe qui a obtenu le plus haut score, c'est logique
Voilà donc mon script sans l'affichage:
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
 
#Création de l'array
	$obj_result=array();
 
#Affichage des résultats par équipe
    print "<table width=720px cellpadding=2 border=1><tr>";
        while ($donneeseqedt = mysql_fetch_array($reponseresulteqedt))
		    {
 
				$nom=$donneeseqedt['nom_tireur'];
				$espace=" ";
				$prenom=$donneeseqedt['prenom_tireur'];
				$nomprenom=$nom.$espace.$prenom;
				$club=$donneeseqedt['nom_club'];
				$total=$donneeseqedt['total'];
 
				# création du tableau à plusieurs dimensions
				if (!isset($obj_result['$club']))
					{
					$obj_result['$club']=array(noms=>'array=()',
											total=>'array=()',
											totaleqp=>0);
					}
 
				array_push($obj_result['$club']['noms'], $nomprenom);
				array_push($obj_result['$club']['total'], $total);
				$obj_result['$club']['totaleqp']+=$total;
				echo '<pre>';
				print_r ($club);
				echo '<br>';
				print_r ($nomprenom);
				echo '<br>';
				print_r ($total);
				echo '<br>';
				print_r ($obj_result['$club']['totaleqp']);
				echo '</pre>';
			}
 
			$sort_result=array();
			foreach($obj_result as $club)
				{
					$sort_result[$obj_result['$club']['totaleqp']]=$club;
				}
			echo '<pre>';
			print_r ($club);
			echo '</pre>';
et voilà ce que cela donne en requete :
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
 
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 125
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 126
 
A.S. Tir Creil BOITEL Anne 234 234
 
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 125
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 126
 
Société de Tir de RantignyMENESTRET Pierre 233 467
 
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 125
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 126
 
A.S. Tir CreilGRELA Viridiana 231 698
 
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 125
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 126
 
La Fraternelle de CuvillyLEVASSEUR Thibault 230 928
 
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 125
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 126
 
La Fraternelle de CuvillyRAMBOUR Pascal 220 1148
 
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 125
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 126
 
Société de Tir de RantignyHUGOT Guillaume 218 1366
 
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 125
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 126
 
Société de Tir de RantignyBIET Julien 215 1581
 
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 125
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 126
 
A.S. Tir CreilDORING Morgane 214 1795
 
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 125
Warning: array_push(): First argument should be an array in d:\gouvieuxtir\test2\Resultats\Ecole\resulteqpecole.php on line 126
 
La Fraternelle de CuvillySELLIER Marine 209 2004
Array
(
    [noms] => array=()
    [total] => array=()
    [totaleqp] => 2004
)
Bref il additionne tout et ne tient pas compte de mes arry_push par club.

Avant de continuer dans ce script, j'aimerais déjà résoudre ce problème.

Merci beaucoup pour votre aide
Jean-Mimi