// Affichage des objets classement 1. $objets1query = doquery ("SELECT id, type, name, buycost, special , image, description FROM {{table}} WHERE type=1","items"); $i=0; while($row = mysql_fetch_row($objets1query)){ $i++; $tabl[$i]=$row[0]; } for ($count1=0 ;$count1= 0 GROUP BY weaponid ORDER by occurences DESC LIMIT 5 ","users"); $objets1query = doquery ("SELECT u.weaponname, count(u.weaponid) as occurences, i.buycost, i.image, i.special FROM {{table}} AS u, rpg_items AS i WHERE u.weaponid >= 0 AND i.id = u.weaponid GROUP BY u.weaponid ORDER by occurences DESC LIMIT 5","users"); $weapon =''; $row = '0'; while ($row = mysql_fetch_array($objets1query)) { $weapon .='
Nom: ' . $row['weaponname'] . '
Prix: ' . $row['buycost'] . ' rubis
Equipé: '.$row['occurences'].' perso.
'; } }