Bonjour, le code ci dessous me donne une liste de mes membres, avec leurs ID, leur email, et leur nombre de filleuls (ref). Je voudrai trier cette liste par nombre de filleuls. Comment faire? Merci.
Code:
<?
include("header.inc.php");
?>
</strong>Liste des membres classé par parrain</u></span><br>
<table width="88%" height="32" border="1" align="center" bordercolor="#000000" bgcolor="#FFFFFF">
<tr><td width="9%" class=Style1>
<center class=Style1 >ID</center></td><td width="20%" class=Style1>
<center class=Style1 >E-mail</center></td><td width="17%" class=Style1>
<center class=Style1 >Ref
<? $result = mysql_query("SELECT name, id, email, url, points, views, hits, savepoints FROM `demo_a_accounts`");
while ($myrow = mysql_fetch_row($result)){
$direkt = mysql_num_rows(mysql_query("SELECT id FROM `demo_a_accounts` WHERE `refererid` = '$myrow[1]'"));
if ($myrow[7] == 1) {$sparen = "oui";} else {$sparen = "non";};
$resultb = mysql_query("SELECT name, id, email, url, points, views, hits FROM `demo_a_accounts` WHERE id='$myrow[1]'");
while ($myrowb = mysql_fetch_row($resultb)) {
echo"
<TR>
<td class=Style1><center class=Style1 ><b> $myrow[1] </b></TD>
<td class=Style1><center class=Style46 ><b><A href=mailto:$myrow[2]>E-mail</a></b></A></TD>
<td class=Style1><center class=Style1 ><b>Refs: $direkt </b></TD>";
};
};
?>