I would suggest creating cache file, which will store those ten links throughout a day. Then create a cron job that will run script every midnight, choose links randomly and write links to cache file.
SQL query to choose ten links:
SELECT * FROM links ORDER BY RAND() LIMIT 0,10;
If you don't have acces to cron jobs, you can check every time a user visits a page if date now is the same as date of file modification. If file is older then today, run the query and write new links to cache file.
<?php
if (is_file("cache.txt") && date("mdy") == date("mdy",filemtime("cache.txt")))
{
//read links from file
}
else
{
//read links from database and write them to cache.txt
}
?>