How can i sort by an mysql column? like if i have a table of group members, thier email, and thier rank and wanted them to be displayed in order of rank. Could i assign a number for each type of rank and have it sort in oder of that column? Here is the part of the page that displays the members in default order:
<?php
$i=0;
while ($i < $num) {
$name=mysql_result($result,$i,"name");
$position=mysql_result($result,$i,"position");
$email=mysql_result($result,$i,"email");
echo "<tr bgcolor=\"E6E6E6\">
<td>
$name
</td>
<td>
$position
</td>
<td>
<a href=\"mailto:$email\">$email
</td>
</tr>";
++$i;
}
?>