All pastes #168815 Raw Edit

Anonyme

public text v1 · immutable
·published 2006-09-13 10:46 UTC
rendered paste body
// Affichage des objets classement 1. 
$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">'.mysql_num_rows($objets1query).' perso.</span><br></td></tr></table>';
       }