The selecting part is done with SQL. Eg. you want to select the 10 latest added rows from your table you'd write like this:
$getrows = mysql_query("SELECT TOP 10 * FROM tablename ORDER BY dateField DESC") or die("Error in SQL query<br>mySQLerror: ".mysql_error());
while ($rows = $getrows) {
echo($rows["nameOfField"]."<br>");
}
Note: I'm pretty new to PHP and the above code is untested. I'm sure about the SQL part, though.