// Вывод 3-х рандомных файлов
$req = mysql_query('SELECT t1.id, t1.name, t1.screen
FROM download AS t1
JOIN (SELECT (RAND() * (SELECT MAX(id) FROM download)) AS id) AS t2
WHERE t1.id >= t2.id ORDER BY t1.id ASC LIMIT 3;');
while ($arr = mysql_fetch_assoc($req)) {
echo '';
echo '' . $arr['name'] . '';
}