Bonjour,

Voici un apperçu du traitement que je fais :
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
 
$strSQL = "SELECT tags.label, tags.id, COUNT(lien_tag.tag_id) AS quantite 
	FROM tags, lien_tag WHERE tags.id = lien_tag.tag_id 
	GROUP BY tags.label 
	ORDER BY quantity ASC LIMIT 25 ";
$resultat = requete_SQL($strSQL);
 
 while ($row = mysql_fetch_array($resultat)) {
            $tags[$row['label']] = $row['quantite'];
        }
         $max = max(array_values($tags));
         $min = min(array_values($tags));
	 $size = .....
.....
while ($row = mysql_fetch_array($resultat)) {
		echo '<a href="mapage.php?tag='.$row['id'].'"style="font-size: '.$size.'%">'.$row['label'].'</a> ';
        }
Sachant qu'une fois le premier while interpreté mon curseur est positionné à la fin, le second est inopérant.
Par facilité, j'ai contourné le problème en ré-exécutant une 2ième fois la requête, mais cela ne me plait pas.

Avez vous une idée de comment je pourrais optimiser ce code ?