I think it sounds pretty simple...you're code should look something like this...
$query = "SELECT column1, column2, column3 FROM table";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
This way you'll get everything into an array. Then you can print the table for the roster using a while statement.
echo '<table><tr><td>Name</td><td>Rank</td><td>Serial Number</td></tr>';
WHILE ($row) {
echo "<tr><td>' . $row[1] . '</td><td>' . $row[2] . '</td><td>' . $row[3] . '</td></tr>";
};
echo '</table>';
The while loop will print off your records until there is nothing left from the mySQL query, therefor you won't need to know how many. If you only want a certain amount, you can adjust the query and it should be fine. I didn't check the code offhand, but it should take care of what you need.
Was this what you were looking for?