I have a db of teams and i was wondering how to order them by wins. Most wins at top of the list and fewest at the bottom. I got it to output them in the order they sit in the db but have no idea how to sort them by win/loss .Heres my code
<?php
$place=1;
$result= mysql_query("SELECT * FROM teams");
if (!$result){
die("Database query failed: " . mysql_error());
}
while ($row = mysql_fetch_array($result)){
echo $place++. " ".$row[name]." ".$row[won]."<br />";
}
?>
any ideas?