rendered paste body// 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<count($tabl);$count1++)
{
$objets1query = doquery ("SELECT weaponname, count(weaponid) as occurences FROM {{table}} WHERE weaponid >= 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 .='<table border="0" height="40"><tr><td><img src="images/objets/'. $row['image'].'.jpg" title="' . $row['weaponname'] . '"/></td>
<td><b>Nom: </b><span class="rose3">' . $row['weaponname'] . '</span><br><b>Prix: </b><span class="rose3">' . $row['buycost'] . ' rubis</span><br><b>Equipé: </b><span class="rose3">'.$row['occurences'].' perso.</span><br></td></tr></table>';
}
}