Hello,
I'm loading data from my database but now I need them sorted as well, after "score".
I need the highest score to be on the top, and let's say it shows a total of 50.
that means if someone have 100 score, and rest is 99-10 and the last is 1.. I want 100 on top, 1 on buttom and 99-10 between.. bet you understood it
Any ideas? my script is this so far:
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("my_db", $con);
$result = mysql_query("SELECT * FROM members");
echo "<table border='1'>
<tr>
<th>Name</th>
<th>Score</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['score'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>