Hi,
is the code part of a script or just the script ?
Besides that, you're missing one record because of the if statement. Change the code to something like
<?php
$db = mysql_connect("localhost", "LOGiN", "PASSWORD");
mysql_select_db("links",$db);
$result = mysql_query("SELECT * FROM links ORDER BY RAND() LIMIT 10",$db);
if (mysql_num_rows($result)) {
while ($myrow = mysql_fetch_array($result)) {
printf("-<a href='%s' target='_blank'>%s</a><br> \n",$myrow["link"], $myrow["title"]);
}
} else {
echo "Sorry, no links were found!";
}
?>
The mysql_fetch_array in the if statement fetches the first record, so the do...while loop won't display the first record.
Thomas