You probably sort the rows in your table, either in descending or ascending order.
All you need to do is change the order and get the first 10.
example:
mysql_query("SELECT * FROM names ORDER BY name DESC");
the above query should be changed to:
mysql_query("SELECT * FROM names ORDER BY name ASC LIMIT 10");
You can also run another query to count the number of rows, and then fetch the last 10 rows.
example:
$sql = mysql_fetch_assoc(mysql_query("SELECT COUNT(*) AS counter FROM names"));
mysql_query("SELECT * FROM names ORDER BY name DESC LIMIT " . ($sql['counter'] - 10) . ", 10");