伙计们。我有以下脚本
<?php
$result = mysql_query("SELECT * FROM players") or die(mysql_error());
echo "<table class=\"table table-bordered table-hover\" border='1' cellpadding='10'>";
echo "<tr> <th>ID</th> <th>Place</th> <th>Name</th> <th>Points</th> <th></th> <th></th></tr>";
// loop through results of database query, displaying them in the table
while($row = mysql_fetch_array( $result )) {
// echo out the contents of each row into a table
echo "<tr>";
echo '<td>' . $row['id'] . '</td>';
echo '<td>' . $row['place'] . '</td>';
echo '<td>' . $row['name'] . '</td>';
echo '<td>' . $row['points'] . '</td>';
echo '<td><a href="wtawomenedit.php?id=' . $row['id'] . '">Edit</a></td>';
echo '<td><a href="deleter.php?id=' . $row['id'] . '">Delete</a></td>';
echo "</tr>";
}
// close table>
echo "</table>";
?>
该脚本显示了 MySQL 表中的所有内容,但行是混合的,当我将它用于 rang 列表时,我想显示按点过滤的行。具有较高点的行排在第一位,依此类推。提前谢谢你,我什么都没做。像以前那样,所以我不知道如何使它工作。